ios + icloud: com.apple.developer.ubiquity-container-identifiers value not allowed

1.7k Views Asked by At

I have a problem uploading my app via Application Loader. I used the Archive for publishing function in Xamarin Studio and opened the created ipa in the application loader. And then I got the following error:

ERROR ITMS-90164: "Invalid Code Signing Entitlements. The entitlements in your app bundle signature do not match the ones that are contained in the provisioning profile. According to the provisioning profile, the bundle contains a key value that is not allowed: '[ "iCloud.info.mycompany.myapp" ]' for the key 'com.apple.developer.ubiquity-container-identifiers' in 'Payload/MyApp.app/MyApp'"

My app is using the cloudkit, so I added a icloud container and associated it with the app id in the developer portal.

entitlements.plist:

...
<key>com.apple.developer.ubiquity-container-identifiers</key>
<array>
    <string>iCloud.info.mycompany.myapp</string>
</array>
<key>com.apple.developer.icloud-services</key>
<array>
    <string>CloudDocuments</string>
    <string>CloudKit</string>
</array>
...
1

There are 1 best solutions below

0
On

It is really annoying! The trick is opening the project's provisioning profile and check what are the strings. However, if it's a app you're trying to submite to AppStore, you should only use strings related to Production. For instance, one of my Entitlements is this one:

<?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>
    <string>CloudKit</string>
    <key>com.apple.developer.icloud-container-environment</key>
    <array>
      <string>Production</string>
    </array>
    <key>com.apple.developer.icloud-container-identifiers</key>
    <array>
      <string>iCloud.[MY BUNDLE]</string>
    </array>
    <key>com.apple.developer.ubiquity-container-identifiers</key>
    <array>
      <string>iCloud.[MY BUNDLE]</string>
    </array>
  </dict>
</plist>

Where [MY BUNDLE] is like br.com.riandesign.myproject.