Created
June 26, 2017 13:33
-
-
Save craigmarvelley/bb4cc49561d48edf3a060e482fd51cd7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Assume we have an NSPersistentStoreCoordinator which has been initialised with our entity model, and | |
// an NSURL which points to our store's location on disk | |
NSDictionary *sourceMetadata = [NSPersistentStoreCoordinator metadataForPersistentStoreOfType:NSSQLiteStoreType URL:storeUrl options:options error:&error]; | |
NSManagedObjectModel *destinationModel = coordinator.managedObjectModel; | |
BOOL storeIsCompatible = [destinationModel isConfiguration:nil compatibleWithStoreMetadata:sourceMetadata]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment