Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add Objective-C Bridging Header entry?

I have a Swift project and have add a cocoapod, which is written in Objective-C. It has header and implementation files. From what I understand, to use/import these files into my Swift files, I need to add a bridging file.

I found this site describing how to do this manually, since the Objective-C files are already part of my project (from the cocoapod).

http://www.learnswiftonline.com/getting-started/adding-swift-bridging-header/

1.) Navigate to your project build settings and find the “Swift Compiler – Code Generation” section. You may find it faster to type in “Swift Compiler” into the search box to narrow down the results.

2.) Next to “Objective-C Bridging Header” you will need to add the name/path of your header file. If your file resides in your project’s root folder simply put the name of the header file there.

I don't have a Objective-C Bridging Header in that section and it doesn't appear you can add new entries there.

enter image description here

I'm using Xcode 7.3.1. Anyone have some idea how this should be done?

like image 308
4thSpace Avatar asked Feb 06 '23 13:02

4thSpace


1 Answers

Are you sure you looked at the correct Build Settings section, search with the keyword Swift compiler - General in the search field as describe below and then you can find it.

enter image description here

like image 136
ldindu Avatar answered Feb 10 '23 23:02

ldindu