0

I have created my own cocoa POD framework in swift, which uses #import CommonCrypto/CommonCrypto.h in Objective C bridging header file, but when I try to use same POD in project, It gives compile error -

Include of non-modular header inside framework module '': '/Users/macmini/Downloads/Xcode_9.2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.2.sdk/usr/include/CommonCrypto/CommonCrypto.h'"

Please let me know how I can fix the same.

I am using this for creating my own POD framework in swift.

1

1 Answer 1

0

Go to Project Target -> Build Settings -> search for "Modules" -> Set "Allow Non-modular Includes In Framework Modules" to Yes.

This will allow you to use Objective C bridging header file in your project.

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

2 Comments

Adding "Allow Non-modular Includes In Framework Modules" to YES, does not work. Still getting same error
Then you should try "@import CommonCrypto/CommonCrypto.h;" instead of "#import CommonCrypto/CommonCrypto.h" as both are potential workarounds but both breakdown under some cases. Converting to @import ceases to work if there are transitive dependencies.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.