0

I'm adding CloudKit to an existing OSX App I've created and looking to put it on the App Store. I need to know if I change the BundleID of the app will it effect CoreData retrieval? I have over 500 records in the current app and I don't want to lose them just to put it on the App Store. The reason for the question is..... I tried to add the Apps current BundleID in developer.apple.com Identifiers >>> AppleIDs and the bundleID is invalid. If I create a valid one will it screw up the records I currently have stored in CoreData and not be able to view the records I currently have? Hope that makes sense!

If it will effect the records I currently have, what can I do about it?

rmaddy
  • 314,917
  • 42
  • 532
  • 579
Lexter
  • 33
  • 8

1 Answers1

0

The bundle identifier is always globally unique and basically maps to a folder on the filesystem. That of course means, if you change your bundle ID, your persistent store has a different location.

The problem is that your filesystem access is sandboxed, so by default you cannot access the data from another app (changing the bundleID treats it as a different app). One common way is to use an app group. But since you are not distributing your app in the appstore, that is not an option for you.

You would need to manually migrate the data another way before updating to the new bundle ID. From the device to a storage (web/cloud service), have the user update the app and retrieve the data again.

MartinM
  • 832
  • 6
  • 12
  • Thanks Martin. I've added all the data to the Cloud by iterating through each record and posting that info to the Cloud and I can now access it from other devices. Thank you. – Lexter Aug 27 '19 at 09:19