Xcode MyProjectName-Bridging-Header.h does not exist

If the bridging file is created at the same level as the other classes, you might need to add the relative path, as these pictures show. Note here that the bridging file is created at the same level as the other classes: enter image description here

I have the name entered correctly in the Build Settings, enter image description here

but the compiler doesn't find the file. enter image description here

Therefore, if I add the relative path from the root of the project (that is, I add ./ProjectName/BridgerFileName.h), enter image description here

now it compiles and I can call a method in my Objective C class: enter image description here


I found that after creating the bridging header file manually and choosing the default name and location, the bridging header will be placed in the project directory, which is under the root directory.

This requires the following value for the setting: Targets > [Your App Target] > Build Settings > Swift Compiler - Code Generation > Objective-C Bridging Header:

$(SRCROOT)/$(PROJECT_NAME)/$(PROJECT_NAME)-Bridging-Header.h 

Note that if your project is a swift module (framework) then, as pointed out in the comments, you might prefer:

$(SRCROOT)/$(PROJECT_NAME)/$(SWIFT_MODULE_NAME)-Bridging-Header.h

For those who are removing the Bridging Header

I was going the opposite way as most of the other answers here. I had been using a Bridging Header previously, but I didn't need it anymore. After I deleted it from my project I started getting the error mentioned in the question. I performed the following steps to solve my problem.

  1. Go to Targets > [Your App Target] > Build Settings > Swift Compiler - General > Objective-C Bridging Header and delete the path. (Thanks to @Donamite for the idea.) (You can just start typing "bridging" into the search box to find it.)
  2. Delete the derived date. Go to Xcode > Preferences > Locations and click the gray arrow by the Derived Data folder. Then delete your project folder.

enter image description here


In Swift 4.1

your project you don't have bridging-Header.h file, but your project has that path. For this you need to delete that path...

Go to targets file and select Build Settings, ---->Swift Compiler - General, and delete the bridging-Header.h. Follow below screen shots....enter image description here

Delete the bridging-Header.h file in Swift Compiler - General

enter image description here

Now you got like this...

enter image description here


These are steps to create Bridging header.

  1. File->New->iOS->Header File, Give the bridging file name as like "yourProjectName-Bridging-Header.h"

  2. Build-Settings->Objective-C Bridging Header, Just give the bridging header file name be like "ProjectName-Bridging-Header.h"

    NOTE: Bridging header file should be located in the main root folder of the project where the ".xcodeproj" file located. If not move the Bridging header file to the root folder of the project. This way Xcode able to access the bridge file.

  3. Build the project, and import necessary files in Bridging header.