Transferring Apps with iCloud KVS

Hi All!

I'm being asked to migrate an app which utilizes iCloud KVS (Key Value Storage). This ability is a new-ish feature, and the documentation about this is sparse [1]. Honestly, the entire documentation about the new iCloud transfer functionality seems to be missing. Same with Game Center / GameKit. While the docs say that it should work, I'd like to understand the process in more detail.

Has anyone migrated an iCloud KVS app? What happens after the transfer goes through, but before the first release? Do I need to do anything special? I see that the Entitlements file has the TeamID in the Key Value store - is that fine?

        <key>com.apple.developer.ubiquity-kvstore-identifier</key>
        <string>$(TeamIdentifierPrefix)$(CFBundleIdentifier)</string>

Can someone please share their experience?

Thank you!

[1] https://developer.apple.com/help/app-store-connect/transfer-an-app/overview-of-app-transfer

Answered by GreenFrogInThePond in 760205022

It turns out that the Provisioning Profile will have the OLD team identifier; that's what'll go in the Entitlements file.

Accepted Answer

It turns out that the Provisioning Profile will have the OLD team identifier; that's what'll go in the Entitlements file.

Same issue here, the only problem is that the provisioning profile that gets created automatically is getting created with the bundle id of the extension and not the main app.

I am sure that it was the main app before the transfer since when i received the app from the old developer the .entitlement file had this:

<key>com.apple.developer.ubiquity-kvstore-identifier</key>
<string>$(TeamIdentifierPrefix)$(CFBundleIdentifier)</string>

Let's say the CFBundleIdentifier is BUNDLEID

Checking the provisioning profile that gets created on my account it has this:

com.apple.developer.ubiquity-kvstore-identifier: 
OLD-TEAM.BUNDLEID.share

it contains the share that is an extension target created in the project.

I can now change my entitlement to be:

<key>com.apple.developer.ubiquity-kvstore-identifier</key>
<string>OLD-TEAM.$(CFBundleIdentifier).share</string>

And it would create the archive and uploaded to App Store Connect, but it doesn't seem correct.

How can i change the com.apple.developer.ubiquity-kvstore-identifier in the automatically generated provisioning profile so that it doesn't contain the .share at the end?

That the ubiquity-kvstore-identifier in the system-generated provisioning profile has an extra “.share” sounds pretty strange to me.

@Danny182 @van-bsp @Yamashita3, did you file a feedback report yet? If not, would you mind to file one and share your report ID here?

Best,
——
Ziqiao Chen
 Worldwide Developer Relations.

I have the exact same issue as Danny182.

Before transfering the application (that contains a share and a notification server extension), the value for the com.apple.developer.ubiquity-kvstore-identifier entitlement key for the main app and the two extension targets was OldTeamIdentifier.KVSIdentifer.

Post transfer, the value that got automatically assigned by Apple in the "iOS Team Provisioning Profile" (managed) for the main application is something like: OldTeamIdentifier.NotificationServiceIdentifier and for the two extension targets the value for that key is NewTeamIdentifier.*.

That means that if I issue an update using the new provisioning profiles for my app now, the KVS functionality will certainly break as:

  • All of the targets (both the main application and the extensions) point to a KVS identifier that does not exist, thus anything stored there will be inaccessible to the users.
  • The main application target points to KVS identifier 1 and the share and notification service extension targets point to KVS identifier 2. Given that for the extensions the value has a wildcard (*) suffix, I can replace it with NotificationServiceIdentifier but I can't change the NewTeamIdentifier to the OldTeamIdentifier, making it impossible to match the value of the main app.

Any ideas? Do I need to contact an Apple engineer for this?

Transferring Apps with iCloud KVS
 
 
Q