Hi, I'm trying to add Swift code to my Obj-C project. I've gone through all the tutorials and troubleshooting advice I can find online, no dice. I would appreciate any help, thank you so much in advance.
- I add a new swift file to my Obj-C project
- XCode offers to create a bridging header file for me, yes please
- New .swift file and .h file are added to my project no problem
- Header file shows up in build settings no problem
- I add a new class to my new swift file ("@objc class HelloPrinter: NSObject")
- When I build the app, nothing is generated in the bridging header file and the class is obviously inaccessible to my obj-c code
Is this supposed to work? My understanding is that it's supposed to work.
Somewhat concerning is the text that XCode puts in the bridging header file when it's created: "Use this file to import your target's public headers that you would like to expose to Swift."
I don't want to use this bridging header file for anything. I want XCode to GENERATE STUFF in the bridging file. I also don't want to expose anything to Swift. I want the opposite to happen. So I don't get this text at all. Thanks in advance again.