0

I updated a Swift library (updating .swift files and adding new .swift files to my project)but in doing so the old bridge header is not found, and Xcode 8.3.3. doesn't prompt to create a new one.

This article shows the window with the button "create bridging header": http://pinkstone.co.uk/how-to-use-swift-classes-in-objective-c/

Any ideas?

My #import "app-Swift.h" isn't found after adding the new files. Nor can I right click and go to definition.

bhartsb
  • 1,316
  • 14
  • 39

1 Answers1

-1

You can create Bridging Header manually.

  1. Add new header file. Name it something meaningful as ProjectName-Bridging-Header.h
  2. Select Project -> Target -> Build Setting
  3. Search for "bridging header" in the search box
  4. Double click the on Objective-C Bridging Header value portion
  5. Drag and drop your manually created ProjectName-Bridging-Header file
  6. Build your project

Click to show a video tutorial

nayem
  • 7,285
  • 1
  • 33
  • 51
  • 2
    I'm not importing Obj-C into swift I'm importing Swift into Obj-C. I want the auto generated header with all the method signatures. Just as it says in the Apple doc "When you import Swift code into Objective-C, you rely on an Xcode-generated header file to expose those files to Objective-C. This automatically generated file is an Objective-C header that declares the Swift interfaces in your target. It can be thought of as an umbrella header for your Swift code. " – bhartsb Aug 08 '17 at 21:50