Search code examples
iosswiftxcodeproject-navigator

Some files not showing in Xcode project navigator


I added two files and a core data model to my Xcode project yesterday, and after saving I went off, but came back this morning to find they are not there. When I look in the project files, they are still there, but they, are not showing in the project navigator.

When I build and run the app it doesn't crash (As in when I go on the views with one of those files, it recognises the file.)

Is this a common problem and is there a way to fix this?

Thanks in advance, any help is much appreciated

Edit: I do get this error though:

Failed to load model named [Project_name]
CoreData: error:  Failed to load model named [Project_name]

Solution

  • Ok I figured it out, and will post here in case anyone else has the same problems.

    1) Using Finder, take the files out of your project.

    2) Then drag them from finder into the project navigator, and do any actions needed e.g. making groups e.t.c. to restore the state it was in before.

    3) Save the project, close it and reopen it to check that everything is all good.