Compatibility problem with .xcdatamodeld between Xcode 4.1 (Lion) and Xcode 3.2.5 (snow leopard)

别说谁变了你拦得住时间么 提交于 2019-12-10 02:28:35

问题


I have a problem with a Data Model using Core Data.

1/ I've created a data model on xcode 4.1 (on lion) with my entities and their relationships. In the inspector on the right i've checked "Tools version" : Minimum : Xcode 3.2 instead of Xcode 4.1.

2/ When i try to reopen my project, in Xcode 3.2.5 (on snow leopard), I click on "mydatamodel.xcdatamodeld", then on "mydatamodel.xcdatamodel", but nothing happen ! It's like my xcdatamodel file was empty but it's a 4.9 Mo file ! My xcdatamodel file refuses to open and it's very frustrating.

3/ I've tried just to add only the xcdatamodel file which is in the xcdatamodeld folder on xcode 3.2.5 but it's generating a crash of Xcode.

4/ I've tried to create "test.xcdatamodel" on xcode 3.2.5 (on snow leopard) and to copy paste files "elements" and "layout" from "mydatamodel.xcdatamodel" ( created on Xcode 4.1 on lion) to "test.xcdatamodel" but same thing, the data model refuses to open !

If anyone can help me, it will be great !


回答1:


The format of .xcdatamodel bundles was changed between these 2 versions of Xcode. The format of the elements and layout are now xml based, whereas they used to be binary data.

You can change the minimum required Xcode version in the file inspector for your .xcdatamodel file.




回答2:


XCode 4.1 is available for Snow Leopard. I suggest you just try using the same version on both machines.




回答3:


It is more reliable to use latest XCODE ver 4.2. Compatible with lion (OSX 10.7).There are amazing features like ARC,storyboard and much more.



来源:https://stackoverflow.com/questions/6940594/compatibility-problem-with-xcdatamodeld-between-xcode-4-1-lion-and-xcode-3-2

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