Interface Builder could not open the document “.xib” because it does not exist

后端 未结 4 1987
眼角桃花
眼角桃花 2020-12-05 23:43

I am localizing an app, following the steps listed here. I have successfully achieved that with around 45 .xib\'s, while just 4 of them gives me this error:

\"Interf

4条回答
  •  天涯浪人
    2020-12-06 00:18

    To me this happened after a Git merge. The project file must have changed so much that now it gives all these errors. Those sensitive project files...

    So anyway, what I ended up doing is just removing the files from the project (sending them to Trash) and then re-adding them to the project with a git checkout other_branch path/to/file

    After this, building the project did not throw this error anymore.

    • It seems to work fine also if you remove just the reference and then re-add the file to the project (no need to send it to Trash)
    • Important You should remove any red files from your Build Phases - Compile Sources of your target's settings. Those are files that XCode thinks are still there and thinks it should still try to compile, but when it doesn't find them, it gives back this error.

提交回复
热议问题