ios - CoreData-Project with two entities -


this question has answer here:

i've 2 tableviews in app , user should able add objects both of them. 1 tableview works fine (there's 1 coredata entity). when add entity , same things 1 tableview, xcode shows me error.

the output is:

 unresolved error error domain=nscocoaerrordomain code=134100 "the operation couldn’t completed. (cocoa error 134100.)" userinfo=0x10333d80 {metadata={     nspersistenceframeworkversion = 419;     nsstoremodelversionhashes =     {         buy = <883135e4 2884b0ed 4bb8fc1c 7d56c229 fbae3090 91be719d 73ac5d66 65e70b18>;     };     nsstoremodelversionhashesversion = 3;     nsstoremodelversionidentifiers =     (         ""     );     nsstoretype = sqlite;     nsstoreuuid = "...";     "_nsautovacuumlevel" = 2; }, reason=the model used open store incompatible 1 used create store}, {     metadata =     {         nspersistenceframeworkversion = 419;         nsstoremodelversionhashes =         {             buy = <883135e4 2884b0ed 4bb8fc1c 7d56c229 fbae3090 91be719d 73ac5d66 65e70b18>;         };         nsstoremodelversionhashesversion = 3;         nsstoremodelversionidentifiers =         (             ""         );         nsstoretype = sqlite;         nsstoreuuid = "...";         "_nsautovacuumlevel" = 2;     };     reason = "the model used open store incompatible 1 used create store"; } (lldb)  

i've tried solve hours, did same thing in second tableview in first.

maybe me. in advancen

when you're designing model need migration:

http://developer.apple.com/library/ios/#documentation/cocoa/conceptual/coredataversioning/articles/introduction.html

so first thing should create new model version.

for things adding fields , entities coredata can automatically via lightweight migration. more complicated things you'll need create mapping model.

if app isn't in store , doesn't have users don't need worry migration @ all. delete app off phone/simulator , run app. if have app in store absolutely must specify new model version , migration.


Comments

Popular posts from this blog

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -