Klas Zetterlund
Klas Zetterlund

Reputation: 151

Xcode, Cannot read bundle contents (Error Domain=NSCocoaErrorDomain Code=260

I am at my wits end. I've been messing around trying to change the name of my iphone-app and have apparently broken something. When I try to build I get the error message

/Users/john/Desktop/ubernerds/fardig/renrakat.xcdatamodeld: Cannot read bundle contents (Error Domain=NSCocoaErrorDomain Code=260 "The folder “renrakat.xcdatamodeld” doesn’t exist." UserInfo={NSFilePath=/Users/john/Desktop/ubernerds/fardig/renrakat.xcdatamodeld, NSUserStringVariant

There is a file called renrakat.xcdatamodeld in the folder fardigt, so what could be the problem? When I start my backup copy (made before I started making dumb changes) I get the same error when I try to build

Please help!

I'm running xcode 7.1.1

Upvotes: 0

Views: 8248

Answers (3)

LukeSideWalker
LukeSideWalker

Reputation: 7930

Maybe the following "work-around" could help !?

    1. Start a brand-new project
    1. Name it the way you want
    1. Copy all resources from the damaged project to the new project
    1. Try building again

Upvotes: 0

ngoctung.nguyen2408
ngoctung.nguyen2408

Reputation: 89

If you can not find the lost file:

You create a new xcdatamodeld (right click on the old xcdatamodeld that error -> new file)

Xcode will create model.xcdatamodel

copy and paste old name to the new xcdatamodel (also delete old.xcdatamodeld first) and run project

the xcdatamodel folder in your project folder will replace with "old name 2 xcdatamodel folder"

Upvotes: 0

Klas Zetterlund
Klas Zetterlund

Reputation: 151

When I ran the /Users/john/Desktop/ubernerds/fardig/renrakat.xcdatamodeld/ ] && echo "File exists" || echo "File do not exitsts" in the terminal I ofund that the file was indeed in the wrong folder. Moved it and everything worked fine

Upvotes: 0

Related Questions