4

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.

4

1 Answer 1

2

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.