Reputation: 7562
I am trying to upload app to testflight via Appcenter, and I have icloud document storage functionality therefore I have added following enlistement into enlistement.plist:
<?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-services</key>
<array>
<string>CloudKit</string>
<string>CloudDocuments</string>
</array>
<key>com.apple.developer.icloud-container-identifiers</key>
<array>
<string>iCloud.com.company.appname</string>
</array>
<key>com.apple.developer.ubiquity-kvstore-identifier</key>
<string>$(AppIdentifierPrefix)$(CFBundleIdentifier)</string>
</dict>
</plist>
I followed this tutorial:
https://developer.apple.com/library/content/technotes/tn2415/_index.html
But when I try to push release to itunes connect to testflight I get this error:
DEBUG [2018-04-24 06:34:46.43]: [Transporter]: DBG-X: parameter ErrorMessage = ERROR ITMS-90046: "Invalid Code Signing Entitlements. Your application bundle's signature contains code signing entitlements that are not supported on iOS. Specifically, value 'Development' for key 'com.apple.developer.icloud-container-environment' in 'Payload/App.MobileApp.iOS.app/App.MobileApp.iOS' is not supported."
My certificate distribution and provision profile are set to production as suggested here: What kind of Certifcate and Provisioning Profile is needed for an iOS Apple TestFlight release?.
Upvotes: 2
Views: 1036
Reputation: 61
I spent tons of hours trying to figure it out how to solve this on App Center and I came with a workaround.
Define a key in your Entitlement with this name:
com.apple.developer.icloud-container-environment
which will contain an array with a string value:
Production
Your Entitlement will look something like this:
<key>com.apple.developer.icloud-container-environment</key>
<array>
<string>Production</string>
</array>
Make sure your build definition is on Release or AppStore mode and you have your correct Entitlements in your provisioning profile and you should be good.
Explanation: I think the process to check your Entitlements through AppCenter is getting both values when it gets the environments available for your build, instead of using a process like the Xcode / VS Studio / Itunes Connect uses when it validates your provisioning profile environment through Apples Developer Account’s API.
Hope this works to you.
Upvotes: 3