I'm trying to update an app that implements core data store. Adding the attribute
I said the following code for my representative class:
- (NSPersistentStoreCoordinator *) persistentStoreCoordinator {if (! PersistentStoreCoordinator = Void) {return persistentStoreCoordinator; } NSURL * storeUrl = [NSURL fileURLWithPath: [[Self-Application Document Directory] stringBeeAppendingPathComponent: @ "Shoppee.sqlite"]]; NSError * Error = Zero; Continuous store coordinator = [[NSPSlistListCoDditorALOC] initWithManagedObjectModel: [Self-managed object model]]; NSDictionary * Options = [NSDictionary dictionaryWithObjectsAndKeys: [NSNumber numberWithBool: Yes], NSMigratePersistentStoresAutomaticallyOption, [NSNumber numberWithBool: Yes], NSInferMappingModelAutomaticallyOption, zero]; If (Continuous Store Cordinator Extender Storey Type: NSSQLiteStoreType Configuration: Zero URL: Store URL Options: Option Error: & amp; Error]) {NSLog (@ "Error:% @", error); NSLog (@ "Unsolver Error% @,% @", Error, [Error User Information]); Abortion (); } Return Constant Store Coordinator; }
It was from the following URL:
I get the following error while executing the code:
2009-12- 01 Shoppee [25633: 207] Error: error
domain = NSCocoaErrorDomain code = 134,130
UserInfo = 0x1624d20 "operation could not be performed: 20: 04: 22.877
Shoppee [ Complete (Coco error 134130.) "2009-12-01 20: 04: 22.879 Shoppee [25,633: 207] Unsolved error error domain = NSCocoaErrorDomain code = 134,130 UserInfo = 0x1624d20". Operation can not be completed (Coco error 134130 .) ", {URL = File: // localhost / Users / Eric / Library / Application% 20Support / iPhone% 20Simulator / User / Applications / A 8A8FB73-9AB9-4EB7-8F83-82F5B4467AF1 / Documents / MyApp.sqlite; Metadata = {NSPersistenceFrameworkVersion = 241; NSStoreModelVersionHashes = {item = & lt; 869d4b20 088e5c44 5c345006 87d245cd 67ab9bc4 14cadf45 180251e9 f741a98f>; Store = & lt; 47c250f4 895e6fd1 5033ab42 22d2d493 7819ba75 3c0acffc 2dc54515 8deeed7a>; }; NSStoreModelVersionHashesVersion = 3; NSStoreModelVersionIdentifiers = (); NSStoreType = SQLite; NSSTUUIDID = "8 DC 65301-3 BC 5-42 BE-80B8-E44577B 8F8E1"; }; Cause = "Model can not be found for source store"; }
It seems that I need to include the original data model, but I'm not sure how to do this. any suggestion?
No comments:
Post a Comment