Xcode Core Data: Change existing XML to Sqlite (NSXMLStoreType to NSSQLiteStoreType)
问题 On my first app I used within my persistant store coordinater a NSXMLStoreType. [storeCooordinator addPersistentStoreWithType:NSXMLStoreType configuration:nil URL:storeURL options:options error:nil]; Now, I like to change to a NSSQLiteStoreType: [storeCooordinator addPersistentStoreWithType:NSSQLiteStoreType configuration:nil URL:storeURL options:options error:nil]; The app crashes, if I simply change the store type. So what I have to do? May I have to do once: check if the old store exists