My iOS app uses CloudKit key-value storage. I have not updated the app in a few years but it works fine. Since it was last updated, I transferred the app from an old organization to my personal developer account. Now that I'm working on the app again I get an error: Provisioning profile "iOS Team Provisioning Profile: com.company.app" doesn't match the entitlements file's value for the com.apple.developer.ubiquity-kvstore-identifier entitlement.
In the entitlement file, it has $(TeamIdentifierPrefix)$(CFBundleIdentifier) as the value for iCloud Key-Value Store. I've verified the variables resolve as expected. When I parse the provisioning profile there is no entitlement value for key-value storage. What am I getting wrong?
I’m going to research this further and get back to you.
I reached out to a colleague about this and they confirmed that my guess was correct. Better yet, they pointed me at App Store Connect Help > Transfer an app > Overview of app transfer > Apps using iCloud, which covers this topic specifically. It says this:
If your app uses any of the following, it will be transferred to the transfer recipient after they accept the app transfer.
- …
- KVS identifiers associated with the app
which confirms that iCloud key-value store preferences are expected to transfer, and this:
If your app uses iCloud Key-Value Storage (KVS), the full KVS value will be embedded in any new provisioning profiles you create for the transferred app. Update your entitlements plist with the full KVS value in your provisioning profile.
My interpretation of this is that you it’s telling you to do what we’ve done in this thread, that is, set the value in the .entitlements file to match that in the profile, that is, the value with the old Team ID.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"