Reputation: 1293
I am making a open-source library in Swift, it uses a third-party library (MailCore) which is itself in Obj-C so I added a bridging-header in my library.
The library is itself working fine when I run in my example project but when I try to use it as a CocoaPod in a Swift project then the compiler shows the following error:
Include of non-modular header inside framework module 'MyLib.MyLib_Bridging_Header': 'path/to/my/otherProject/Pods/Headers/Public/mailcore2-ios/MailCore/MailCore.h'
P.S - I am using my library in a Swift project using cocoa pods using use_frameworks!
Can you please help me in solving this issue?
Edit :
I have no intention to make it as a framework , this question is regarding the frameworks.
Upvotes: 4
Views: 3956
Reputation: 3563
I solved it removing Modules
folder from the framework.
Browse to your framework location which is present in the App Project using finder
Go inside Test.framework
folder (In the above case it will be MailCore.framework
) & Delete Modules
folder.
Clean and Re Build the app, it will solve the problem.
Upvotes: 2