cordova-ios: Recieved Error: Command failed with exit code 65

Bug Report

I ran the command cordova build ios and it returned xcodebuild: Command failed with exit code 65

Problem

The command failed.

What is expected to happen?

It should have built correctly.

What does actually happen?

It doesn’t build and returns an error. See the error in the post I made: https://stackoverflow.com/questions/61847125/ionic-cordova-build-ending-with-xcodebuild-command-failed-with-exit-code-65

Information

I have a full log of what happened here: ERROR

Command or Code

cordova build ios

Environment, Platform, Device

I am running this on Ionic 5 Angular 9. I am on a Macbook Pro Mojave 10.14.6 and Xcode 11.3.1.

Version information

I included that information in the previous section.

Checklist

  • I searched for existing GitHub issues
  • I updated all Cordova tooling to most recent version
  • I included all the necessary information above

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 4
  • Comments: 21 (4 by maintainers)

Most upvoted comments

@marcelmedina

error: Named colors do not work prior to iOS 11.0.

If you’re using Cordova-iOS 6.x, the minimum supported iOS version is 11.0. You may need to remove a deployment-target preference from config.xml if it is set to a lower version.

Try with previous version of ios library:

cordova platform rm ios cordova platform add ios@5.1.1

FYI, using cordova 6.x and setting the deployment-target to 11.0 also works:

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

FYI, using cordova 6.x and setting the deployment-target to 11.0 also works: <preference name="deployment-target" value="11.0" />

Confirm that changing deployment-target from 9.0 to 11.0 helped me too!

i could solve this by adding .0 to the version (11)

- <preference name="deployment-target" value="11" />
+ <preference name="deployment-target" value="11.0" />

Doesn’t this mean anyone using iOS versions below 11.0 won’t be able to install or update the app?

Correct.

Is there another solution?

You can stay on cordova-ios@5.1.1. You’d need to install a wkwebview plugin and add <preference name="WKWebViewOnly" value="true" /> flag to your config.xml to make the app compliant with the UIWebView deprecation. More details can be found on Cordova’s Blog.

The primarily reason why cordova-ios@6 requires min iOS 11.0 is because it uses the WKWebView url scheme feature to solve many CORS-related issues that occurs on WKWebView when using the file:// protocol. This feature only exists in iOS 11+. You may also see these issues on cordova-ios@5.1.1, particularly if you use XMLHttpRequest on your local resources (which is a common pattern if you use the angular framework). If this is the case, you’ll also need to use a third-party plugin cordova-plugin-wkwebview-file-xhr@2.1.4 Note the plugin version, their latest version is only for cordova-ios@6 and later.

This won’t be a long term solution, as time goes on, changes will likely be required to support newer xcode versions, and these generally aren’t backported to older versions. But this should work for awhile.

I’m getting a consistent error 65, that starts with this error:

CompileStoryboard sample/CDVLaunchScreen.storyboard
    cd /Users/mm/Documents/sample/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:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/share/dotnet:~/.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 --target-device ipad --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/sample/sample.PGK/Core/sample.PGK.Core.Ionic/platforms/ios/sample/CDVLaunchScreen.storyboard
/* com.apple.ibtool.document.errors */
/Users/mm/Documents/sample/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.

In the end I get:

** BUILD FAILED **


The following build commands failed:
	CompileStoryboard sample/CDVLaunchScreen.storyboard
(1 failure)
xcodebuild: Command failed with exit code 65

Closing this issue as the OP’s issue had to deal with the change in build system where older cordova-ios versions had to use the legacy build system.

cordova-ios@6 supports the new build system, so changing to legacy shouldn’t be required anymore.

See the SO accepted answer for more info.