Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Swift framework umbrella header - Include of non-modular header inside framework module

I'm trying to include openssl framework into the swift framework I'm building (I created it with cocoapods - pod lib create) . When I go to default umbrella header and import some header form openssl framework I get Include of non-modular header inside framework module.
I tried everything to fix this (checked questions form stackoverflow), including solution with allow non-modular includes.
I was using openssl framwork in normal swift projects by importing it inside bridging header, and I had no problems like this.

like image 766
Branko Avatar asked Feb 14 '16 13:02

Branko


1 Answers

After long time I finally found a solution that worked for me.

Include of non-modular header inside framework module means that you must make framework you want to include modular. That can be done by creating custom module map, where you define new module for desired framework.
You can find here how to create custom module map.

Important thing to note is that I managed this only with dynamic frameworks. Other important thing is you must use absolute path in module map (e.g. header "/Users/User1/Documents/Project/TestProject/Sample.framework/Headers/sample.h"

like image 199
Branko Avatar answered Nov 20 '22 18:11

Branko