iOS - Copy sqlite to bundle for CoreData
Here's what I've done: Created the sqlite file with a populated version of the app. Copied that file into my app bundle, making sure that the target is set and that it is present in "Copy Bundle Resources" I then try to populate Core Data like this: - (NSPersistentStoreCoordinator *)persistentStoreCoordinator { if (_persistentStoreCoordinator != nil) { return _persistentStoreCoordinator; } NSURL *storeURL = [[self applicationDocumentsDirectory] URLByAppendingPathComponent:@"TestModel.sqlite"]; if( ![[NSFileManager defaultManager] fileExistsAtPath:[storeURL path]] ) { // If there’s no Data