Error in xcdatamodel

My xcdatamodel file in Xcode seems to behave strangely.

When I create 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 start it again, it starts without errors. Then after a while the error appears again and again when I build again. Sometimes I get another error message that says

Failed to delete existing model.

Any ideas?

+4
source share
2 answers

I was getting the same error and then also got the error mentioned in this other question / answer . Following the suggestion in this answer, the error seems to have disappeared:

Solution 1:

Delete the following directory:

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

Later I got the same error when this first solution did not work. This time, the following solution worked instead:

Solution 2:

Recursively set permissions for 777 for this directory:

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

1. Delete Derived Data : Windows > Projects > Select Project > Derived Data > Delete

2. Clean up the project.

It should work. If still not working,

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

Hope it works !!!

0
source

Source: https://habr.com/ru/post/1434651/


All Articles