Xcode not automatically creating bridging header?

The reason of your issue is, the Xcode build settings still holds the path to auto generated Bridging Header file. You cannot get any build errors because of the header file (ProjectName-Bridging-Header.h) still exist in your project directory.

How to resolve:

Click on your project target, Go to Build Settings tab (choose all instead of basic), search for Bridging Header. You can see the Xcode generated path entry. Select it and click on delete button.

Also, make sure to delete the Xcode auto generated bridging header file (ProjectName-Bridging-Header.h) from your Xcode project directory.

Now, try to import the Obj-C file once again. You can see the prompt to create a bridging header file as expected.

enter image description here

Leave a Comment