Search code examples
objective-cswiftbridging-headersirishortcuts

how to use an intentdefinition file in objective c-swift bridged project?


I am having an app which is developed in objective c. Now I want to integrate that app with Siri Shortcuts using swift. I am using bridging for that.

So now issue is: when my app is getting compiled intentdefinition file for my app is generating Objective C runtime classes (i.e. ".h" and ".m" classes) and intent targets are generating swift runtime classes (i.e. ".swift" class).

So when I am creating a file, that use both targets (i.e. my app as well as intents target), I am getting an error:

Use of undeclared type


Solution

  • project settings -> select target -> Build Settings -> Precompile Bridging Header

    set this to NO