2

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 enter image description here

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?.

sensei
  • 7,044
  • 10
  • 57
  • 125
  • 1
    But it's complaining about the section above that. Maybe you should remove `Development` – valdetero Apr 24 '18 at 17:19
  • I don't have it in my document at all – sensei Apr 24 '18 at 18:10
  • 1
    Yes, it is in the array for the key mentioned in the error: `com.apple.developer.icloud-container-environment`. You have two entries in the array: one is Production, one is Development. Delete the line that @valdetero mentioned. Please note that you are highlighting the entries for com.apple.developer.icloud-container-**identifiers**, not com.apple.developer.icloud-container-**environment** as the error states. – wottle Apr 24 '18 at 19:03
  • second image you see is not my document.. all i have in enlistement.plist is first xml – sensei Apr 24 '18 at 19:44

1 Answers1

3

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.