Command failed with exit code 65 - Cordova-ios 6.1.0 and Angular 9

Hi there,

I am getting a compilation error on cordova-ios 6.1.0 and Angular 9. XCode 11.5. The latest stack.
Not sure what is really happening, I really appreciate any tips on how to fix that:

CompileStoryboard Sample/CDVLaunchScreen.storyboard
    cd /Users/mm/Documents/dev/Sample.PGK/Core/Sample.PGK.Core.Ionic/platforms/ios
    export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/Users/mm/Documents/dev/Sample.PGK/Core/Sample.PGK.Core.Ionic/node_modules/.bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/share/dotnet:/Users/mm/.dotnet/tools:/Library/Apple/usr/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands"
    export XCODE_DEVELOPER_USR_PATH=/Applications/Xcode.app/Contents/Developer/usr/bin/..
    /Applications/Xcode.app/Contents/Developer/usr/bin/ibtool --errors --warnings --notices --module Sample --output-partial-info-plist /Users/mm/Library/Developer/Xcode/DerivedData/Sample-bvrieshnghaqwbegvatmqkxrcaky/Build/Intermediates.noindex/Sample.build/Debug-iphonesimulator/Sample.build/CDVLaunchScreen-SBPartialInfo.plist --auto-activate-custom-fonts --target-device iphone --minimum-deployment-target 10.0 --output-format human-readable-text --compilation-directory /Users/mm/Library/Developer/Xcode/DerivedData/Sample-bvrieshnghaqwbegvatmqkxrcaky/Build/Intermediates.noindex/Sample.build/Debug-iphonesimulator/Sample.build /Users/mm/Documents/dev/Sample.PGK/Core/Sample.PGK.Core.Ionic/platforms/ios/Sample/CDVLaunchScreen.storyboard
/* com.apple.ibtool.document.errors */
/Users/mm/Documents/dev/Sample.PGK/Core/Sample.PGK.Core.Ionic/platforms/ios/Sample/CDVLaunchScreen.storyboard:Ze5-6b-2t3: error: Named colors do not work prior to iOS 11.0.

CompileAssetCatalog build/emulator/Sample.app Sample/Images.xcassets
    cd /Users/mm/Documents/dev/Sample.PGK/Core/Sample.PGK.Core.Ionic/platforms/ios
    export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/Users/mm/Documents/dev/Sample.PGK/Core/Sample.PGK.Core.Ionic/node_modules/.bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/share/dotnet:/Users/mm/.dotnet/tools:/Library/Apple/usr/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands"
    /Applications/Xcode.app/Contents/Developer/usr/bin/actool --output-format human-readable-text --notices --warnings --export-dependency-info /Users/mm/Library/Developer/Xcode/DerivedData/Sample-bvrieshnghaqwbegvatmqkxrcaky/Build/Intermediates.noindex/Sample.build/Debug-iphonesimulator/Sample.build/assetcatalog_dependencies --output-partial-info-plist /Users/mm/Library/Developer/Xcode/DerivedData/Sample-bvrieshnghaqwbegvatmqkxrcaky/Build/Intermediates.noindex/Sample.build/Debug-iphonesimulator/Sample.build/assetcatalog_generated_info.plist --app-icon AppIcon --compress-pngs --enable-on-demand-resources YES --filter-for-device-model iPhone12,8 --filter-for-device-os-version 13.5 --sticker-pack-identifier-prefix nz.co.Sample.app.sticker-pack. --development-region en --target-device iphone --minimum-deployment-target 10.0 --platform iphonesimulator --product-type com.apple.product-type.application --compile /Users/mm/Documents/dev/Sample.PGK/Core/Sample.PGK.Core.Ionic/platforms/ios/build/emulator/Sample.app /Users/mm/Documents/dev/Sample.PGK/Core/Sample.PGK.Core.Ionic/platforms/ios/Sample/Images.xcassets
2020-06-26 13:09:04.566 ibtoold[63485:1359377] DEBUG: Added to environment: {
    TMPDIR = "/var/folders/ls/8k4nss195yvd32fycs37f2_40000gp/T/77A96612-43CD-4CEA-80DE-3AEAA615D81E";
}

** BUILD FAILED **


The following build commands failed:
	CompileStoryboard Sample/CDVLaunchScreen.storyboard
(1 failure)
Command finished with error code 65: xcodebuild -workspace,Sample.xcworkspace,-scheme,Sample,-configuration,Debug,-sdk,iphonesimulator,-destination,platform=iOS Simulator,name=iPhone SE (2nd generation),build,CONFIGURATION_BUILD_DIR=/Users/mm/Documents/dev/Sample.PGK/Core/Sample.PGK.Core.Ionic/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR=/Users/mm/Documents/dev/Sample.PGK/Core/Sample.PGK.Core.Ionic/platforms/ios/build/sharedpch
xcodebuild: Command failed with exit code 65
Error: xcodebuild: Command failed with exit code 65
    at ChildProcess.whenDone (/Users/mm/Documents/dev/Sample.PGK/Core/Sample.PGK.Core.Ionic/platforms/ios/cordova/node_modules/cordova-common/src/superspawn.js:136:25)
    at ChildProcess.emit (events.js:182:13)
    at maybeClose (internal/child_process.js:962:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)
[ERROR] An error occurred while running subprocess cordova.
        
        cordova build ios --verbose exited with exit code 65.
        
        Re-running this command with the --verbose flag may provide more information.
  ionic:utils-process onBeforeExit handler: 'process.exit' received +0ms
  ionic:utils-process onBeforeExit handler: running 2 functions +1ms
  ionic:utils-process processExit: exiting (exit code: 65) +79ms

I have tried this fix approach, but it didn’t work in my case.
From the error details, it seems that cordova is building on a version prior to IOS 11.
Is there a way to force the compilation process to use iOS 11?

My system details:

Ionic:

   Ionic CLI                     : 6.10.0 (/usr/local/lib/node_modules/@ionic/cli)
   Ionic Framework               : @ionic/angular 5.2.1
   @angular-devkit/build-angular : 0.901.7
   @angular-devkit/schematics    : 9.1.7
   @angular/cli                  : 9.1.7
   @ionic/angular-toolkit        : 2.2.0

Cordova:

   Cordova CLI       : 8.1.2 (cordova-lib@8.1.1)
   Cordova Platforms : ios 6.1.0
   Cordova Plugins   : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 5.0.0, (and 34 other plugins)

Utility:

   cordova-res                          : not installed
   native-run (update available: 1.0.0) : 0.2.2

System:

   ios-deploy : 1.9.2
   ios-sim    : 8.0.2
   NodeJS     : v10.15.0 (/usr/local/bin/node)
   npm        : 6.9.0
   OS         : macOS Catalina
   Xcode      : Xcode 11.5 Build version 11E608c

I really appreciate any help on this.

1 Like

Lols…I got it to work by setting the deployment-target on config.xml:

<preference name="deployment-target" value="11.0" />
4 Likes

My case is a bit more complex. I use CodePush and he is using cordova-plugin-file-transfer that are deprecated.

Hi @ludufre,

I’ve got the same issue with CodePush. Have you managed to go through this issue already? If so, could you share, please?

Yeah. I updated cordova-plugin-code-push@1.13.1. With Cordova iOS 6, remember to remove cordova-plugin-wkwebview-engine.
More details: https://cordova.apache.org/announcements/2020/06/01/cordova-ios-release-6.0.0.html and

Thanks for the fast reply.
I’ve followed your steps, updated code-push to 1.31.1 and there was no cordova-plugin-wkwebview-engine already in the package.json, but it didn’t work for me.
It keeps throwing the following error:

CompileC /Users/carlos/Library/Developer/Xcode/DerivedData/myApp-cvzejwbbhwoujucdrjhihwkgkazl/Build/Intermediates.noindex/myApp.build/Debug-iphonesimulator/myApp.build/Objects-normal/x86_64/CDVWKWebViewEngine+CodePush.o /Users/carlos/Desktop/Restaurant.UI.Mobile/platforms/ios/myApp/Plugins/cordova-plugin-code-push/CDVWKWebViewEngine+CodePush.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler

cordova build ios --verbose exited with exit code 65.

Thanks for your help.

Any update ? Same problem here

$ ionic cordova build ios --buildFlag="-UseModernBuildSystem=0" --verbose

output :

The following build commands failed:
	CompileC /Users/appcom/Library/Developer/Xcode/DerivedData/AppCom-dexlxqwhtmpmkpcupiokjzxcwmlj/Build/Intermediates.noindex/AppCom.build/Debug-iphonesimulator/AppCom.build/Objects-normal/x86_64/CDVFileTransfer.o /Users/appcom/Documents/v2/app/platforms/ios/AppCom/Plugins/cordova-plugin-file-transfer/CDVFileTransfer.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
Command finished with error code 65: xcodebuild -workspace,AppCom.xcworkspace,-scheme,AppCom,-configuration,Debug,-sdk,iphonesimulator,-destination,platform=iOS Simulator,name=iPhone SE (2nd generation),build,CONFIGURATION_BUILD_DIR=/Users/appcom/Documents/v2/app/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR=/Users/appcom/Documents/v2/app/platforms/ios/build/sharedpch
xcodebuild: Command failed with exit code 65
Error: xcodebuild: Command failed with exit code 65
    at ChildProcess.whenDone (/Users/appcom/Documents/v2/app/node_modules/cordova-common/src/superspawn.js:136:25)
    at ChildProcess.emit (events.js:314:20)
    at maybeClose (internal/child_process.js:1047:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5)
[ERROR] An error occurred while running subprocess cordova.
        
        cordova build ios --verbose exited with exit code 65.
        
        Re-running this command with the --verbose flag may provide more
        information.
  ionic:utils-process onBeforeExit handler: 'process.exit' received +0ms
  ionic:utils-process onBeforeExit handler: running 2 functions +0ms
  ionic:utils-process processExit: exiting (exit code: 65) +51ms

Hi @zeTechMoy,

I’ve found problem was caused by webview not being in latest version.

I was able to solve my problem by updating the cordova-plugin-code-push to 1.13.1 (as @ludufre said) and then updating the cordova-plugin-ionic-webview to latest version (If webview is required for you).

Also I’ve found cordova-plugin-advanced-http has the same dependency of cordova-plugin-file

Here is the link that helped me as well, so you can try some of these steps:

I’ve tried almost the same approach, but removing some plugins and then adding in another sequence.

- Remove cordova-plugin-advanced-http, cordova-plugin-code-push and cordova-plugin-ionic-webview
- Add cordova-plugin-code-push (1.13.1), cordova-plugin-advanced-http, cordova-plugin-ionic-webview

Don’t forget to clean platforms and plugins folder and delete package-lock.json

Another link that may be relevant in case you’re using ionic-webview: