2015-02-01 2 views
0

xcdatamodeld 엔티티의 모든 속성을 채워야합니까? 코어 데이터를 재생할 때마다 이미지 경로와 문자열을 삽입하려고 할 때 문자열을 삽입하면 충돌이 발생합니다.xcdatamodeld 모든 속성을 채우십시오.

returned error Error Domain=NSCocoaErrorDomain Code=134100 "The operation couldn’t be completed. (Cocoa error 134100.)" UserInfo=0x7fac334193f0 {metadata={ 
     NSPersistenceFrameworkVersion = 519; 
     NSStoreModelVersionHashes =  { 
      Entity = <e4d98363 c5118882 22f0534c 6b38c82e 013fbea8 b50048e4 337fa5ba dfebd41e>; 
     }; 
     NSStoreModelVersionHashesVersion = 3; 
     NSStoreModelVersionIdentifiers =  (
      "" 
     ); 
     NSStoreType = SQLite; 
     NSStoreUUID = "E509F0EC-384B-48BB-954F-81379074917B"; 
     "_NSAutoVacuumLevel" = 2; }, reason=The model used to open the store is incompatible with the one used to create the store} with userInfo dictionary { 
     metadata =  { 
      NSPersistenceFrameworkVersion = 519; 
      NSStoreModelVersionHashes =   { 
       Entity = <e4d98363 c5118882 22f0534c 6b38c82e 013fbea8 b50048e4 337fa5ba dfebd41e>; 
      }; 
      NSStoreModelVersionHashesVersion = 3; 
      NSStoreModelVersionIdentifiers =   (
       "" 
      ); 
      NSStoreType = SQLite; 
      NSStoreUUID = "E509F0EC-384B-48BB-954F-81379074917B"; 
      "_NSAutoVacuumLevel" = 2; 
     }; 
     reason = "The model used to open the store is incompatible with the one used to create the store"; } 2015-02-01 22:35:05.476 test[17368:543208] Unresolved error Optional(Error Domain=YOUR_ERROR_DOMAIN Code=9999 "Failed to initialize the application's saved data" UserInfo=0x7fac3419d060 {NSLocalizedFailureReason=There was an error creating or loading the application's saved data., NSLocalizedDescription=Failed to initialize the application's saved data, NSUnderlyingError=0x7fac33419440 "The operation couldn’t be completed. (Cocoa error 134100.)"}), Optional([NSLocalizedFailureReason: There was an error creating or loading the application's saved data., NSLocalizedDescription: Failed to initialize the application's saved data, NSUnderlyingError: Error Domain=NSCocoaErrorDomain Code=134100 "The operation couldn’t be completed. (Cocoa error 134100.)" UserInfo=0x7fac334193f0 {metadata={ 
     NSPersistenceFrameworkVersion = 519; 
     NSStoreModelVersionHashes =  { 
      Entity = <e4d98363 c5118882 22f0534c 6b38c82e 013fbea8 b50048e4 337fa5ba dfebd41e>; 
     }; 
     NSStoreModelVersionHashesVersion = 3; 
     NSStoreModelVersionIdentifiers =  (
      "" 
     ); 
     NSStoreType = SQLite; 
     NSStoreUUID = "E509F0EC-384B-48BB-954F-81379074917B"; 
     "_NSAutoVacuumLevel" = 2; }, reason=The model used to open the store is incompatible with the one used to create the store}]) 

답변

1

오류는 다음과 같습니다. 저장소를 여는 데 사용한 모델이 저장소를 만드는 데 사용한 모델과 호환되지 않습니다. 핵심 데이터 모델을 업데이트 할 때. (새로운 속성이나 새로운 엔티티를 추가함으로써) Core Data는 olds 데이터를 새로운 모델로 "이전"해야합니다.

그러나 간단한 해결책은 시뮬레이터 나 장치에서 응용 프로그램을 삭제하고 모델을 수정할 때마다 다시 실행하는 것입니다.

+0

덕분에 이제는 완벽하게 작동합니다. – suisied