My app is already on the App Store, but now I'm creating an Apple Watch Extension which also means storing data in a Shared Group
.
How do I go about moving the data from where it's currently stored (Core Data
& UserDefaults
) for the customers that have already downloaded my app, the first time they launch the new update?
What's the most efficient and least resource intensive way of doing this, and only doing it for old users the first time they open the new update?
I had a similar issues, only with user defaults though. All I did was that when the app launches it looks in the shared group location first and if it fails it looks in the old location and then moves it to the new location.
That means that it only has to check multiple locations the first time, something like this process:
Next time you launch the app it will find the keys/values in the shared suite and not need to look at the standard UserDefaults at all.