bridging header build setting not created for second target

I have recently started to update my project to start using swift 3.0. I am using xcode beta 3

I have multiple targets. A bridging header and settings were created properly for the first target when I added a first swift file under Swift Compiler - General / Objective-C Bridging header.


But the second target didn't have the settings added at all. I do not see an option to add that setting manually. I tried to add many swift file to the second target, but i never get the prompt from xcode to add the bridging header. So my second target does not let me bridge obj-c.


How do I force it or add it manually?

I am using xcode beta 3

Just FYI, beta 4 is already out.

But the second target didn't have the settings added at all.

I tried this out and Xcode prompted me to add the bridging header to the second target when I created a new Swift file in that target. I first selected the target’s scheme in the scheme popup, which may be the key.

Regardless, the way to add a bridging header manually is:

  1. create a new header on disk, traditionally called

    ttt-Bridging-Header.h
    , where
    ttt
    is the target name

    IMPORTANT Don’t add this header to any targets.

  2. set the target’s Objective-C Bridging Header (

    SWIFT_OBJC_BRIDGING_HEADER
    ) build setting to the path of that bridging header (relative to the directory containing your project)

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"
bridging header build setting not created for second target
 
 
Q