I am trying to add iCloud Documents Capabilities to my iOS application Bundled in Defold and I keep getting errors.
On the Apple Developer site I’ve created an iCloud Container Identifier and enabled iCloud Capabilities (Compatible with Xcode 5) in the App ID . I’ve also created and downloaded an Ad Hoc app Profile with the iCloud Capabilities App ID.
“iCloud Compatible with Xcode 5” excludes support for CloudKit which is not needed.
With Xcode I generated this iCloud entitlements file:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>com.apple.developer.icloud-container-identifiers</key> <array> <string>iCloud.com.new.test.id</string> </array> <key>com.apple.developer.icloud-services</key> <array> <string>CloudDocuments</string> </array> <key>com.apple.developer.ubiquity-container-identifiers</key> <array> <string>iCloud.com.new.test.id</string> </array> </dict> </plist>
In the Defold project file I point to
/builtins/manifests/ios/Info.plist for the Info.plist setting and I point to
/iCloud.entitlements for the Custom entitlements setting.
I get this error in Defold when I bundle for iOS application:
java.io.IOException: Invalid custom iOS entitlements key 'com..apple..developer..icloud-container-identifiers'.
When I add this setting:
override_entitlements = 1
to the Defold project file the application builds without errors but I get the following error when I try to install the app with Xcode on a device:
The executable was signed with invalid entitlements.
The entitlements specified in your application’s Code Signing Entitlements file are invalid, not permitted, or do not match those specified in your provisioning profile. (0xE8008016).
When I add the entitlements manually to a custom Info.plist file the app builds, installs and launches on the device but it immediately crashes with these errors.
<Error>: secTaskDiagnoseEntitlements MISSING keychain entitlements: no stored taskRef found
<Notice>: AMFI: hook..execve() killing pid 13563: entitlements not XML
Development environment: OSX Version 10.11.6, Defold Version:1.2.164
Any ideas on how to proceed would be most appreciated.