Adding a CoreData Data Model file to XCode 4.2 causes source control to stop working with a question mark

1.3k Views Asked by At

I've been trying in vain for hours now to add a CoreData Data Model file to my XCode project, which is under SVN source control. Whenever I do, I get the following display in XCode:

screen shot

I've followed at least 5 or 6 different articles now on ways to make subversion play nicely with xcdatamodeld files/folders in XCode 4 without much success. I'm about to just give up and leave my data model file outside of source control, but I can't even get subversion/xcode to ignore it. Winning is not an option.

Things I've tried so far:

  • command line add/commit of the Data.xcdatamodeld - this causes XCode 4.2 to go into a tiz and crash repeatedly
  • ignoring the file in XCode Organizer - this causes XCode to report build warnings about a missing Data.xcdatamodeld file, which isn't there in xcode, on the file system or SVN
  • I've followed the suggestion here: http://www.tmro.net/2010/10/subversion-and-core-data-versioning/ only to have XCode then start crashing during any SVN operation at all (I had to delete my local version completely and reload from the repository)
  • I can replicate this in a controlled environment outside of my project

Has anyone seen this before and resolved this issue in XCode?

I can't be the first person to try to add a CoreData Data Model file to an SVN controlled project!

Thanks

1

There are 1 best solutions below

0
On

I saw this also for an otf font bundle.

My datamodel file was stored oddly. In my project directory I had:

./Model.xcdatamodeld/Model.xcdatamodeld/contents

i.e. doubled-up directories

I did a commandline svn on the inner folder only, i.e.

cd ./Model.xcdatamodeld; svn ci Model.xcdatamodeld

It added the inner directory and the contents file, the ? disappeared in XCode and it committed fine. Don't see how the nested directories could be a problem, but this worked for me.