Can't open .xcdatamodel CoreData file

Discussion in 'Mac Programming' started by DaveP, Jun 13, 2009.

  1. DaveP macrumors 6502


    Mar 18, 2005
    I'm trying to fool around with CoreData for the first time, and maybe I'm missing something major...

    I'm looking at a couple of online tutorials and one of the first steps is to open the .xcdatamodel within XCode and set up your data structure. However, I always get an error telling me it could not find the file. The path is correct and permissions are fine. Even the CoreData example projects included in the Developer directory behave the same way.

    I had a few different XCode installs from all the recent iPhone SDK releases, so I used the command-line uninstall to remove all of them and then re-installed the latest. But that didn't change anything.

    I'm completely stumped. Any idea?

  2. HiRez macrumors 603


    Jan 6, 2004
    Western US
    When you say the permissions are fine,what do you mean exactly? Did you Repair Permissions from Disk Utility (do that first if you haven't)? Or do you mean you examined the permissions of the .xcdatamodel file itself? It definitely sounds like some kind of permissions issue is a strong possibility.

    Could it be there are ACL permissions overriding the normal UNIX rwx permissions, possibly even in any folder above where your file is residing? Also it may be some of the Core Data framework files themselves (and not your .xcdatamodel files), or dependencies of them. Did you install everything, including Xcode, with admin rights and from the same user account you're using?

    What happens when you double-click the file directly in the Finder?
  3. DaveP thread starter macrumors 6502


    Mar 18, 2005
    Thanks for the reply. By permissions, I do mean the Unix rwx permissions, but I have just done a disk-wide repair permissions to seemingly no effect.

    Yes, I did consider being a permissions or missing file issue within a Core Data file, but don't know really where to look. The install was done on my current account with admin rights.

    When I double click the file within Finder, it switches context to XCode. If that particular project is not open it will seemingly do nothing. If the containing project is open, it gives the same can't open file error.

Share This Page