The model used to open the store is incompatible with the one used to create the store
공개 포스팅 2010. 6. 20. 16:02리소스 폴더의 '프로젝트이름.xcdatamodel' 이라는 이름의 매니지드 오브젝트 모델 파일의 내용과
persistentStoreCoordinator 의 인자로 들어가는 파일의 내용이 서로 다를 때 발생한다.
- (NSPersistentStoreCoordinator *)persistentStoreCoordinator {
if (persistentStoreCoordinator != nil) {
return persistentStoreCoordinator;
}
NSURL *storeUrl = [NSURL fileURLWithPath: [[self applicationDocumentsDirectory] stringByAppendingPathComponent: @"프로젝트이름.sqlite"]];
NSError *error = nil;
persistentStoreCoordinator = [[NSPersistentStoreCoordinator alloc] initWithManagedObjectModel:[self managedObjectModel]];
if (![persistentStoreCoordinator addPersistentStoreWithType:NSSQLiteStoreType configuration:nil URL:storeUrl options:nil error:&error]) {
NSLog(@"Unresolved error %@, %@", error, [error userInfo]);
abort();
}
return persistentStoreCoordinator;
}
'공개 포스팅' 카테고리의 다른 글
XCode 4.0 업데이트 후 기존 3.1 프로젝트 실행 안되는 문제 Base SDK Missing (0) | 2010.06.25 |
---|---|
액션 시트에서 Cancel 버튼의 터치 영역이 안맞을 경우 (0) | 2010.06.23 |
SQLite (0) | 2010.06.16 |
UITextView 테두리 둥그렇게 만들기 (0) | 2010.06.13 |
맥에서 svn( Subversion ) 사용하기 (0) | 2010.06.12 |