
If you want to keep your header inside one group then use New Group and drag&drop your file in that group. You cannot get any build errors because of the header file (ProjectName-Bridging-Header.h) still exist in your project directory. After pressing on Yes Button you get your bridge Header,which you can see in image5. The reason of your issue is, the Xcode build settings still holds the path to auto generated Bridging Header file. After pressing on finish button you get message like Would you like to configure an Objective-C bridging header?.Now in image5&6, I just drag and drop the objective-c header file, after doing that you will get popup message.But after pressing the finish button, you will notice that still there is no bridge present. Image3 is will show the popup message.
Image2 show that I have copied a folder containing objective-c header files,after copying a popup will come on screen. Image1 shows that there is no bridging present at current point of time. If we only use this project by ourselves, it is not a big problem to use absolute path. Usually when we configure the header file containing the project catalog in xcode, we need to associate relative path with absolute path. Here I would give you the best and easiest way of creating Bridge. IOS Development-XCode Environment Variables and Path Settings. There are different way of creating Bridging Header in xcode as mention/suggested above. It could contain white space, for example 'Your App/'. Than go to Build Settings, find "Objective-C Bridging Header" (as previously guys told) and pass way to your Bridging Header as: YourApp/YourApp-Bridging-Header.h Where 'YourApp/' is a name of app. You can see the prompt to create a bridging header file as expected. Now, try to import the Obj-C file once again. Select it and click on delete button.Īlso, make sure to delete the Xcode auto generated bridging header file (ProjectName-Bridging-Header.h) from your Xcode project directory. You can see the Xcode generated path entry. You cannot get any build errors because of the header file (ProjectName-Bridging-Header.h) still exist in your project directory.Ĭlick on your project target, Go to Build Settings tab (choose all instead of basic), search for Bridging Header.
The reason of your issue is, the Xcode build settings still holds the path to auto generated Bridging Header file.