开发者

xcdatamodel corrupted

I am st开发者_如何学Cuck with xcdatamodel being corrupted. I am a newbie and have no clue what to do hereon. Can supply the file which is being questioned alongwith the sqlite db as well...

Do not know what do as I am quite literally brain frozen.. pls help.

TIA


I just had the same issue. In my case, I was moving files in my workspace into sub folders and pointing the groups at the subfolders. I believe this caused the corruption.

Unfortunately I don't have an answer - although I tried a lot of things. Restoring a backup of the file over top the corrupted one didn't work. The xcdatamodel file must be have self-references of some kind. If you open it as a package and then open what's inside as a package, you'll see 2 files: "elements" & "layout". If you copy these out and rename them to have a .plist extension you can see what's inside. Its a pretty tough slog through those plists (looks like an object archive) but you may see something obvious.

In the end I restored my entire project directory to a new location, opened the project and was able to cut and paste the entities over to a brand new data model. Thank god for Time Machine!


I've just had the problem.

I had a time machine so I was able to import it again to xcode but it didn't work. Investigated the package "myapp.xcdatamodeld" imported by xcode, there was only the ".xcccurrentversion" file, but not the "myapp.xcdatamodel" file. I copy pasted the missing file in the package (right clic / show package content) and it worked.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜