Xcode does not find Swift bridging header file in some files

I finally came up with the solution on my own : the project.pbxproj file was kind of corrupted after some git merge I guess. Some files of the project were referenced twice in that file, so I deleted the ones I thought being bad (maybe randomly chosen is closer from the truth).

Now it's working like a charm.

In fact this had no effect on the project until I tried to migrate files to Swift !

It would be a great idea to have a tool or function in XCode to reset this project.pbxproj file to the current things we have.


  1. Add a header file to your project, named [MyProjectName]-Bridging-Header.h. This will be the single header file where you import any Objective-C code you want your Swift code to have access to.

  2. In your project build settings, find Swift Compiler – Code Generation, and next to Objective-C Bridging Header add the path to your bridging header file, from the project’s root folder. So it could by MyProject/MyProject-Bridging-Header.h or simply MyProject-Bridging-Header.h if the file lives in the project root folder.

You only need one Bridging Header. Add your #import statements to this file, and your classes will now be available in your Swift code without any extra import statements.


basing on that asumption https://stackoverflow.com/a/31540611/2150954 I solved this problem in this simple way

Find objective C file, in which compiler claims that it can not find YourProject-Swift file there. Remove it file from project and then add.

After that my project successfully compiled and run