NSManagedObjectModel initWithContentsOfURL: returns nil
NSManagedObjectModel initWithContentsOfURL: returns nil
- Subject: NSManagedObjectModel initWithContentsOfURL: returns nil
- From: Todd Blanchard <email@hidden>
- Date: Thu, 16 Oct 2008 14:33:46 -0700
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 modelFile is an absolute path. If I take this absolute path and
use it in terminal with
open <modelFile>
then XCode happily pops up the model editor. So the path is good,
presumably the model is good since XCode opens it. But I cannot make
it happen programmatically.
The path is /Users/todd/Projects/MyProjectGroup/MyProject/
BusinessModel.xcdatamodel/
The call returns nil. Nothing NSLogged, no exception, no clue
provided at all - just silent failure (which in itself is a bug as far
as I'm concerned).
What would make it return nil?
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden