CoreData: error: (14) I/O error for database
When compiling and running in the XCode a project using Core Data I'm
getting an error I never saw before:
2013-09-12 16:59:10.156 myapp[57811:70b] CoreData: error:
(14) I/O error for database at /Users/administrador/Library/
Application Support/iPhone Simulator/7.0/Applications/
6BA67336-B093-46CF-8B11-E3595409DAC2/myapp.app/database.sqlite.
SQLite error code:14, 'unable to open database file'
The code that generates this message is:
psc = [[NSPersistentStoreCoordinator alloc]
initWithManagedObjectModel:self.managedObjectModel];
NSURL *storeURL = [[NSBundle mainBundle]
URLForResource:@"database" withExtension:@"sqlite"];
[psc addPersistentStoreWithType:NSSQLiteStoreType
configuration:nil URL:storeURL
options:@{NSReadOnlyPersistentStoreOption : @YES} error:NULL];
I have tried Build->Clean, remove derived data, uninstall the app.
I have checked this question before posting and I believe the problem is
different.
Note: The sqlite is a resource of the app
No comments:
Post a Comment