Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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 !

like image 864
Nicolas Avatar asked Aug 04 '11 11:08

Nicolas


1 Answers

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.

Data Model File Inspector

like image 78
Ell Neal Avatar answered Nov 03 '22 16:11

Ell Neal