GeotrekCE / Geotrek-mobile

Cross-platform native app
https://geotrek.fr
BSD 2-Clause "Simplified" License
24 stars 10 forks source link

Build on XCode: Compile Asset Catalog failed #255

Closed JeanLenormand closed 4 years ago

JeanLenormand commented 4 years ago

I would like to deploy GTM for Apple Store, without success, the build failed.

########## CONF ######### OS: macOS 10.15 Beta XCode : 11.2.1 GTM : 3.2.1

########## PROCESS #######

  1. $npm install = no problem

  2. The .xml file is filled, the same for the environment.ts & environment.prod.ts files

  3. The Firebase file GoogleService-Info.plist has been generated and put in ./analytics. The Firebase configuration is well informed in the .xml and environment files

  4. I have verified to have an account related to XCode and an Iphone11 like simulator

  5. $ ionic serve = the project is displayed in the browser

  6. $ ionic cordova resources = Generated 18 resources for android & Generated 50 resources for ios

  7. $ ionic cordova build ios --prod --release --verbose = The following build commands failed: CompileAssetCatalog /Users/jean/Geotrek-mobile/platforms/ios/build/emulator/myAPP\ DEV.app /Users/jean/Geotrek-mobile/platforms/ios/myAPP/Images.xcassets (1 failure) Command finished with error code 65: xcodebuild -workspace,myAPP.xcworkspace,-scheme,myAPP,-configuration,Release,-sdk,iphonesimulator,-destination,platform=iOS Simulator,name=iPhone 11 Pro Max,build,CONFIGURATION_BUILD_DIR=/Users/jean/Geotrek-mobile/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR=/Users/jean/Geotrek-mobile/platforms/ios/build/sharedpch xcodebuild: Command failed with exit code 65 Error: xcodebuild: Command failed with exit code 65 at ChildProcess.whenDone (/Users/jean/Geotrek-mobile/node_modules/cordova-common/src/superspawn.js:135:23) at ChildProcess.emit (events.js:210:5) at maybeClose (internal/child_process.js:1021:16) at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5) [ERROR] An error occurred while running subprocess cordova.

    cordova build ios --release --verbose exited with exit code 65.
  8. I launch the build command in XCode = build failed = here the log Build-target-myAPP_2019-11-21T04-27-04.txt

########## SOLUTIONS TESTING ##########

  1. I tried replacing the images provided = same error

  2. I tried to find solutions in stackoverflow and git: got no issues. For example:

a. link1

b. link2 -> In ../App_Resources/iOS/build.xcconfig the configuration ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; should be removed. = line not found ../App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage should be deleted = file deleted, launch a build = error: None of the input catalogs contained a matching launch image set named "LaunchImage".

Here a capture of the "App Icons and Launch Images" section of the General tab of my XCode project. 72219457_2433364520244658_6560286945178550272_n

  1. I also tried to use a launch storyboard. But, my App Icons and Launch Images section like above have only two fields...

Thanks a lot for helping me!

bastyen commented 4 years ago

Hi, never had this problem. And all seems to be ok. So I think this is a workspace problem

You should just try to rebuild like this :

ionic cordova platform rm ios
ionic cordova build ios --prod --release

This is my actual configuration, maybe it can help :

node -v
v12.11.1

npm -v
6.12.1

ionic -v
5.4.6

cordova -v
9.0.0

macOS 10.15.1
xCode 11.2.1
JeanLenormand commented 4 years ago

Hi, Bastyen, thanks a lot for your answer. But no success and same error after upgrading Ionic and Npm and run these two commands. I will investigate my workspace on XCode. Thanks.

JeanLenormand commented 4 years ago

The error has disappear after using your configuration. Problem seems be solved. Thanks for helping.