0

I’m trying to import a framework in a module/framework of my own.. The 3rd party framework is written in Obj-C, so I need a bridging-header. Unfortunately that’s not possible to have in a framework, so it’s suggested to use the umbrella-header file.

When importing the 3rd party framework in the umbrella-header, I’m getting an error saying Include of non-modular header inside framework module 'MyModule', even though I’ve set in my buildsettings: Allow non-modular includes in Framework Module: true.

I’ve read about changing the 3rd party frameworks headerfiles to be public in the Target Membership option, but that’s not possible. The options simply isn’t showing for the 3rd party framework .h-files - it is showing on my own headerfiles though..

I tried making my own Obj-C library, and then import the 3rd part library there, and map the functions, for then to import that in my Swift library, but that didn’t work either, since my .h files gives me the same error as I was getting in the first place (Include of non-modular header inside framework module 'MyModule')

Is it completely impossible to import a framework written in objective C, into my own Swift framework?

Nicolai Harbo
  • 1,064
  • 12
  • 25

1 Answers1

0

Try going Build Settings under "Target" and set "Allow Non-modular Includes in Framework Modules" to YES.

Asif Mujtaba
  • 447
  • 6
  • 17