XCode Cant' Edit CoreData Model

前端 未结 8 1422
长发绾君心
长发绾君心 2020-12-18 23:44

After adding a CoreData Model to my existing project using

File > New > File... > Core Data > Data Model

I am unable to edit the m

相关标签:
8条回答
  • 2020-12-19 00:39

    I solved it like this in Xcode:

    Right click on your project (not your project folder, I mean that one with the blue Xcode Icon!), than select "New File" and choose the right folder to save the data model.

    Note: Clicking "New File" on the project folder itself or on one of its subfolders did not work somehow..

    0 讨论(0)
  • 2020-12-19 00:40

    Turns out I was attempting to add the Data Model to a group which referenced a specific folder in which to store it's children. That folder however did not exist. This cause XCode to place the data model in the project root, but at the same time reference it as residing 2 directories above the project root. What's even odder is that XCode didn't list the file as missing by displaying it in red. Either way XCode ignored the file when clicked in Project Navigator, because it didn't really exist where it thought it did. Moral of the story is: check your file paths and configured group paths.

    0 讨论(0)
提交回复
热议问题