Change AppId prefix: Effect on access data in Documents folder of the app?

Hi all,


I have an existing app in the AppStore. I would like to add in-app Purchases, so I followed the steps in https://help.apple.com/app-store-connect/#/devb57be10e7


When I want to enable in-app purchases in XCode, I get a problem. Because my app has a wildcard App Id, I can't add in-app purchases.

So I have to change the App Id to an explicit App Id with the TeamId as prefix.


I read the documentation on Potential Loss of Keychain Access here:

https://developer.apple.com/library/archive/technotes/tn2311/_index.html and https://developer.apple.com/library/archive/qa/qa1726/_index.html


I do not use the keychain, so I suppose I don't have an issue there.



But: The app does store data in the Documents folder. Will the new version of my app with another prefix still be able to access the data that was store in the documents folder by the previous folder? Or will the 'old' data be orphaned and will the new version of the app have its own documents folder?


Thanks,



Jennifer

Accepted Reply

The app does store data in the Documents folder. Will the new version of my app with another prefix still be able to access the data that was store in the documents folder by the previous folder?

Yes. The keychain is special because the keychain access group for your app, which is how the system authorises access to keychain items, embeds the App ID as a prefix. The file system does not use this approach for access control, and thus isn’t affected by an App ID change.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

Replies

The app does store data in the Documents folder. Will the new version of my app with another prefix still be able to access the data that was store in the documents folder by the previous folder?

Yes. The keychain is special because the keychain access group for your app, which is how the system authorises access to keychain items, embeds the App ID as a prefix. The file system does not use this approach for access control, and thus isn’t affected by an App ID change.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

Thanks for your answer!

After doing some more reading on this topic, I have a related question.


When I have the current app store version (with prefix A) installed on my iPad and I debug my new veriosn (with prefix B) on the same iPAd, I get the errorr "application-identifier does not match the installed app".

If found technical note 2319 form october 2017 (https://developer.apple.com/library/archive/technotes/tn2319/_index.html#//apple_ref/doc/uid/DTS40013778-CH1-ERRORMESSAGES-UPGRADE_S_APPLICATION_IDENTIFIER_DOES_NOT_MATCH_THE_INSTALLED_APP)

This technical note gives me 2 steps that I have to do in order to successfully install development or beta test builds on top of an existing install that contains a different App ID prefix.

  1. Add a
    previous-application-identifiers
    entitlement to a code signing entitlements file for your app
  2. Request a special provisioning profile from Developer Programs that will also contain the above entitlement.


BUT, I can install a testflight version with prefix B on top of the app store version with prefix A wihtout errors.


So my question is : are these steps still necessary or have things changed since TN2319?



thanks,


Jennifer

BUT, I can install a testflight version with prefix B on top of the app store version with prefix A wihtout errors.

Right. TestFlight installs like the App Store, which means it handles the App ID prefix changing. TN2319 is talking about installing via Xcode, and that uses a very different installation process.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"