2

I'm porting my iphone app to ipad, and therefore created a completely new project. After programming a while, i wanted to import the coredata model from my iphone project, so i can have the same coredata storage layout. but for some reason, xcode 4.2 wont let me use the imported model. after drag-and-dropping the versioned model (foobar.xcdatamodeld) into my ipad project (copying it to the destination), i am unable to select the current version, and the model will not show the arrow-indicator as well as no sub-models in the file-list on the left side of xcode. even if i create a new datamodel (file -> new...), i get the same behaviour. i can't edit the model, because appearently it is not opened (clicking on the model in the file list will not change the editor window in the middle), i cannot add a version to the model (the menu item unter "editor" is not present), and i can't select any current version.

i noticed that the object inspector will state a path that is "Relative to group", with the path beeing "../foobar.xcdatamodeld" (which is "foobar.xcdatamodeld" in my iphone project), and the full path is beeing blank.

i even edited the model and xcode project files through vi, to make it look like the iphone ones, with no success.

so, right now i can't neither add a new datamodel, nor import the existing model.

can anyone help?

user826955
  • 3,137
  • 2
  • 30
  • 71

1 Answers1

0

i have no idea if it's related, but i ran into a weird thing earlier today when copying resources from one project to another. i did the same thing (made sure i selected copy files into destination's group folder etc) and it didn't actually copy them - it was referring to the files in the project i was copying from. weirder still, the project couldn't actually "see" them (the file names were red).

i ended up getting around it by manually copying them into the "to" project's directory, and adding them from there.

Mike K
  • 2,227
  • 1
  • 12
  • 6
  • i already tried that. i even tried to extract one of the non-versioned models and import that one - didnt work. even adding new datamodels doesnt work, neither on my imac nor on the macbook (both at xcode 4.2). i just tried at my imac at work with a different project - worked. maybe the project file is somewhat damaged. ill try re-creating the project and see what happens. – user826955 Jan 05 '12 at 07:11