Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode4 Core Data Model Editor Display Problem

I've had this problem ever since upgrading to xcode 4. In the core data model editor, I can't see my diagram view. Everything else seems to work, but mostly the graphic view is just blank. If I click around on entities in the list, I get a screen that looks like this: http://imgur.com/zE1Ci

like image 391
p.pad Avatar asked Jun 22 '11 00:06

p.pad


People also ask

How to Create NSManagedObject subclass in Xcode 13?

From the Xcode menu bar, choose Editor > Create NSManagedObject Subclass. Select your data model, then the appropriate entity, and choose where to save the files. Xcode places both class and properties files into your project.

How do I enable core data in Xcode?

Get our help adding Core Data to your project So, with your existing project open, create a new project in Xcode (⇧⌘N) and select a Single View App, you can call it whatever you like as we'll be deleting it when we're done. You'll see the “Use Core Data” checkbox on the project options screen, make sure it is checked.

What is scalar type Core Data?

Scalar Types Core Data has support for many common data types like integers, floats, booleans, and so on. However, by default, the data model editor generates these attributes as NSNumber properties in the managed object subclasses.


2 Answers

I hit this problem, here is how I fixed it:

  1. Quit Xcode
  2. In a terminal or finder, remove the file myapp/myapp.xcdatamodeld/myapp.xcdatamodel/layout
  3. Restart Xcode and open your project

Note: No guarantees you won't lose any work product. This solution allowed me to return to a working graphical state at the point just before the graphical problem began and I didn't lose any work.

like image 174
Chris Avatar answered Oct 02 '22 18:10

Chris


I did something similar to Chris:

  1. quit xcode
  2. in finder, locate your datamodel file
  3. copy the file to a safe place (I used my desktop)
  4. delete the file from your project folder
  5. open your project in xcode
  6. right click in the navigator and "Add files"
  7. select the datamodel in the safe place from step 3
  8. tell it to copy the files if necessary
  9. click "Add"
like image 31
Blamdarot Avatar answered Oct 02 '22 16:10

Blamdarot