ios - .xcdatamodeld file not showing data model structure in Xcode -


i have .xcdatamodeld file in project not opening data model.

when click on file in left sidebar in xcode, continues display contents of selected file instead of displaying data model. likewise, when right click on file , choose "open >", cannot select display data model—nothing comes up. checked out code svn repo , filer owner not able see in workspace.

this symptom have seen time time. in @ least 1 case, due xcode having wrong path stored in path component of xcversiongroup section of project.pbxproj file, , having apparently unnecessary additional name component in section. possible manually edit file, i'm reluctant monkey around project file directly, , fortunately there's easier way.

  1. navigate .xcdatamodeld file in finder. easiest way right click/ctrl-click on .xcdatamodeld file , select "show in finder".
  2. drag file finder , drop above or below current reference .xcdatamodeld in project navigator in xcode project.
  3. click ok accept import, ensuring adding correct targets. (which targets correct depend on project.)
  4. you have 2 references same file in project navigator. clicking on either of them bring desired data model structure.
  5. remove duplicate reference model file. click on 1 of file references (doesn't appear matter which, though may better remove old one) , press delete.
  6. in resulting confirmation dialog, sure select "remove reference" only, , not move file trash. (the 2 references point 1 actual file in file system. moving trash trash copy.)

you're left 1 reference data model, , works.

one thing appears trigger bug moving .xcdatamodeld file in file structure on disk. after correctly re-associating file new location (i.e., no longer appears in red in sidebar), 1 section of project file mentioned above not correctly updated, , file not treated correctly xcode data model file.


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -