Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>This is quite simple - once you know where to look.# In your AppDelegate you set-up the NSPersistentStoreCoordinator - and you need to add some options to this to tell it to handle auto-migrate:</p> <pre><code>NSDictionary *options = [NSDictionary dictionaryWithObjectsAndKeys: [NSNumber numberWithBool:YES], NSMigratePersistentStoresAutomaticallyOption, [NSNumber numberWithBool:YES], NSInferMappingModelAutomaticallyOption, nil]; NSError *error; _persistentStoreCoordinator = [[NSPersistentStoreCoordinator alloc] initWithManagedObjectModel: [self managedObjectModel]]; if (![_persistentStoreCoordinator addPersistentStoreWithType:NSSQLiteStoreType configuration:nil URL:storeUrl options:options error:&amp;error]) { // Handle error NSLog(@"Problem with PersistentStoreCoordinator: %@",error); } </code></pre> <p>Then you need to do in xCode:</p> <ol> <li>Select your xcdatamodeld file</li> <li>Select the Editor Menu at the top - then choose Add Model Version</li> <li>Now your xcdatamodeld file have two (modelname.xcdatamodel &amp; modelname2.xcdatamodel ) .</li> <li>Now modelname.xcdatamodel have the green check mark implies it is current version, but we need to change the modelname2.xcdatamodel as a current version</li> <li>Select the xcdatamodeld file and then select the View Menu at the top - then Choose Utilities - then Choose the Show File Inspector is shown in right side of Xcode and then Select the Versioned Core Data Model - have Current(DropDownList) - select modelname2(the one you just made current version have green check mark).</li> <li>Now when you install this version onto a device that has the old model - it will automatically upgrade that model to the new model.<br></li> </ol> <p>keep all of the changed files and then once you get ready to deploy your update you'll delete all the in-between files and just deploy with the oldest and latest models. vice versa (step 4,5,6) for latest to old model(current) </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload