On Oct 16, 2008, at 2:33 PM, Todd Blanchard wrote:

I've been trying to open this core data model all day. XCode can open it.
I'm passing the path the the model file as a file path parameter.

NSManagedObjectModel* model = [[NSManagedObjectModel alloc]initWithContentsOfURL:[NSURL fileURLWithPath:modelFile]];


The path is /Users/todd/Projects/MyProjectGroup/MyProject/ BusinessModel.xcdatamodel/

What you're trying to open is an Xcode data model, which Xcode can compile into a Core Data managed object model (".mom") file. Core Data can't read Xcode data model files directly.

In part, this is because Xcode data model files are allowed to be inconsistent for development convenience -- for example, they can have relationships with no destination entity set -- while Core Data managed object model files require a minimum amount of consistency. Xcode's model compiler will generate warnings and errors to enforce that consistency during model compilation.

  -- Chris

_______________________________________________

Cocoa-dev mailing list ([email protected])

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to