evanescent
evanescent

Reputation: 1373

Error in xcdatamodel

My xcdatamodel file in Xcode seems to be behaving weirdly.

When I build my project for the first time it gives an error

"Unable to write VersionInfo.plist for the versioned model at <Path>" 

and

"Compilation failed for data model at path <Path>"

But when I run it again, it runs without an error. Then after some time the error pops up again and again vanishes when I build again. Sometimes I get a different error message which says

Unable to remove existing model

Any Ideas ??

Upvotes: 4

Views: 755

Answers (2)

NSPratik
NSPratik

Reputation: 4846

1. Remove derived data: Windows > Projects > Select your project > Derived Data > Delete

2. Clean your project.

It should work. If still not working,

3. Run the project continuously (This actually had worked for me..)

Hope it works !!!

Upvotes: 0

John Langford
John Langford

Reputation: 1435

I was getting this same error, then eventually also got the error mentioned in this other question/answer. After following the suggestion in this answer, the error seems to have gone away:

Solution 1:

Delete the following directory:

/Users/john/Library/Developer/Xcode/DerivedData/name-of-app-gfofxrkhgcfgcfecjrnbbgyowlnf

I later got the same error where this first solution didn't work. This time the following solution worked instead:

Solution 2:

Recursively set the permissions to 777 for this directory:

chmod -R 777 /Users/john/Library/Developer/Xcode/DerivedData/name-of-app-gfofxrkhgcfgcfecjrnbbgyowlnf

Upvotes: 2

Related Questions