• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSManagedObjectModel initWithContentsOfURL: returns nil
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: NSManagedObjectModel initWithContentsOfURL: returns nil
      • From: Chris Hanson <email@hidden>
  • Prev by Date: Re: Animating view transitions with Core Animation (problems with BasicCocoaAnimations sample)
  • Next by Date: Re: NSManagedObjectModel initWithContentsOfURL: returns nil
  • Previous by thread: Re: Faceless background app that uses NSAppleScript
  • Next by thread: Re: NSManagedObjectModel initWithContentsOfURL: returns nil
  • Index(es):
    • Date
    • Thread