Xcode 7: xcdatamodeld does not exist

After upgrading to Xcode 7 to support iOS9, I had the following build error

error: Cannot read bundle contents (Error Domain=NSCocoaErrorDomain Code=260 "The folder "VoIP.xcdatamodeld" doesn't exist. 

Create target myTitle of myTitle project with Debug setting

DataModelCompile Build / Products / Debug-iphoneos / myTitle.app / / Users / myself / MyDev / m 1 / app / VoIP / VoIP / VoIP.xcdatamodeld cd / Users / itself / MyDev / m1 / app / app / iPhone export PATH = "/Applications/Xcode.app/Contents/Developer/Platforms / iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/USR/ben : / bin: / USR / SBIN: / SBIN "/Applications/Xcode.app/Contents/Developer/usr/bin/momc --sdkroot / Applications / Xcode.app / Contents / Developer / Platforms / iPhoneOS.platform / Developer / SDKs / iPhoneOS9.0.sdk --iphoneos-deployment-target 7.0 --module myTitle / Users / myself / MyDev / m1 / app / VoIP / VoIP / VoIP.xcdatamodeld / Users / myself / MyDev / m 1 / app / app /iPhone/Build/Products/Debug-iphoneos/myTitle.app/

/Users/myself/MyDev/m1/app/VoIP/VoIP/VoIP.xcdatamodeld :: error: cannot read package contents (Error Domain = NSCocoaErrorDomain Code = 260 "folder" VoIP.xcdatamodeld "does not exist." UserInfo = 0x7fd0f350f99f9909999 NSFilePath = / Users / self / MyDev / m1 / application / VoIP / VoIP / VoIP.xcdatamodeld, NSUserStringVariant = (Folder), NSUnderlyingError = 0x7fd0f350f940 "Operation could not be completed (error OSStatus -43.)"})

How can I solve it?

The only link to this file in my project is this (in the .project file)

 /* Begin XCVersionGroup section */ 449367DE1338E89100DB4AC9 /* myTitle.xcdatamodeld */ = { isa = XCVersionGroup; children = ( 449367DF1338E89100DB4AC9 /* VoIP.xcdatamodel */, ); currentVersion = 449367DF1338E89100DB4AC9 /* VoIP.xcdatamodel */; name = myTitle.xcdatamodeld; path = ../../../../VoIP/VoIP/VoIP.xcdatamodeld; sourceTree = "<group>"; versionGroupType = wrapper.xcdatamodel; }; /* End XCVersionGroup section */ 

I don’t know how this happened and why it worked without problems in previous versions of xcode.

+7
ios iphone xcode xcode7
source share
2 answers

Check Compile Sources in the Build Phases section to configure the goal described in the following figure.


enter image description here


I carefully studied all the resources and found one resource without any path (unknown resource, I do not know how it appeared there). Remove it from there, clean the product and run.

Above was the only reason in my case.

Hope this helps you.

+11
source share

I had the same problem when I hid a new model and, unfortunately, the selected solution did not work for me. For me it was: find the model file in the project folder in Finder ("ModelNameHere.xcdatamodeld"); right-click and select "Show Package Contents". You will see all versions of the model - delete the one that should not exist.

+8
source share

All Articles