Я нашел такой хороший кусок кода в CoreDataBooks
NSString *storePath = [[self applicationDocumentsDirectory] stringByAppendingPathComponent: @"CoreDataBooks.sqlite"];
/*
Set up the store.
For the sake of illustration, provide a pre-populated default store.
*/
NSFileManager *fileManager = [NSFileManager defaultManager];
// If the expected store doesn't exist, copy the default store.
if (![fileManager fileExistsAtPath:storePath]) {
NSString *defaultStorePath = [[NSBundle mainBundle] pathForResource:@"CoreDataBooks" ofType:@"sqlite"];
if (defaultStorePath) {
[fileManager copyItemAtPath:defaultStorePath toPath:storePath error:NULL];
}
}
в CoreDataBooksAppDelegate.m: 154 , для меня это означает, что каждый раз, когда приложения не находят файл sqlite, он копируется из пакета, где он не был изменен путем изменения CoreDataBooks.xcdatamodel .
Попробуйте использовать другой подход или просто измените файл sqlite в комплекте.