“Data Model Version Compile”.. error after upgrading to Lion (Xcode4.1)

此生再无相见时 提交于 2019-11-28 07:38:50

I've had the same issue, OS X Lion 10.7.1, Xcode 4.1.

The problem is solved by removing all *.xcdatamodel directories that are not displayed in Xcode from your *.xcdatamodelid directory. These directories appear after *.xcdatamodel renaming in Xcode.

Removing may be done in Terminal, by “Show package contents” menu in Finder or by right-clicking on xcdatamodel in Xcode and selecting "Show in Finder".

Restart XCode and delete all the data from the Derive Data Folder.

Steve Varley

Interestingly I found that I had this scenario after installing a new version of Xcode. It was caused by Xcode running from the mounted DMG. I chased the problem around for a bit until I eventually figured out it was doing the build using the tools on the DMG rather than the files copied to Applications. By ejecting the Xcode DMG it resolved the problem. Thought I'd post this in case it benefits anyone else. I suspect a number of the fixes being posted here and on other threads are working in some cases by chance of a reboot unmounting the DMG.

I suddenly had this trouble on my CI after updating OSX (minor update). Jenkins couldn't build any Obj-C projects and always stopped with the same error (not depending on the project/datamodel).

The fix was to simply remove the derivedData folder and reboot the machine.

rm -rf ~/Library/Developer/Xcode/DerivedData/*
sudo reboot
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!