Can/Should I have more than one Objective-C bridging header?
bridging-header, objective-c, swift, xcode
Solution
Project: directory for main bridging header
Targets:
selfTitledTarget: directory for main bridging header
SiriIntent: directory for new bridging header
That makes no sense. Projects don't have bridging headers; targets do. And their bridging header build settings are not directories; they are files.
So, step one is to make sure you have just two bridging headers, one per target.
After that, I would suggest importing all your Objective-C `.h` files in both bridging headers. It can't hurt, and it should solve your problems.
Problem
I'm attempting to implement some new Siri integrations into my app. I have an old Objective-C header that I've been using on my project as a whole, but now this new Siri Intents target also needs a header. So now I have two objective-c bridging headers, one for the main project and its target, and another for the Siri Intents target. It's not working like I expected it to. I'm getting the "unresolved use of identifier" error referring to one of the objective-C classes I'm trying to import. In my build settings for the following: - Project: directory for main bridging header - Targets: - selfTitledTarget: directory for main bridging header - SiriIntent: directory for new bridging header My main bridging header includes all the imports of the new bridging header just to be safe. I didn't have this problem prior to starting the new Siri implementations. I have another project that is ONLY the Siri implementations and that one works fine, so I'm guessing that my problem is rooted in the fact that I have multiple bridging headers?