One thing bothers me, I am developing iOS app. Firstly when hasPerformedFirstLaunch I load core data, it works good. But later, when I'll update my app. I would like to change core data. How can I do this or How you do this? It is an app where a lot of data that will accrue updates.
My first launch
if (![[NSUserDefaults standardUserDefaults] boolForKey:@"hasPerformedFirstLaunch"]) {
[self initialCoreData];
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"hasPerformedFirstLaunch"];
[[NSUserDefaults standardUserDefaults] synchronize];
}
Core Data has the ability to migrate models from old versions to newer ones automatically, albeit with a few limitations. There's lots of documentation and there are some decent tutorials around if you search for "lightweight migration."
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments