Now I would like to migrate my ObjC framework to Swift and I got the following error:
include of non-modular header inside framework module 'SOGraphDB'
The references is to a header file which just define a protocol and I use this header file in some classes to use this protocol.
Is seems related to the module feature but it is at the moment not quite clear how to fix, do you know a solution?
UPDATE:
This is a Swift compiler error.
UPDATE 2:
A quick fix (but not solving the root cause) is to set the following setting to yes: CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES
Don't
Do
I had this problem importing the Parse framework. The only way I could fix it was to discard all my changes since my last commit (simply deleting the framework and cleaning the project did not work) and add Parse again (after a fresh download of the SDK) with its other required frameworks.
Solution for me was to go on target-> build settings->Allow non-modular includes in Framework Modules switch to YES!
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 beSOGraphDB.framework
) & DeleteModules
folder.Clean and Re Build the app, it will solve the problem.
I got this problem after updating a project from swift2 to swift3. I was using XCode 8.3.2 to update the code and could not get rid of the error “non-modular header inside framework module”. When I opened the same project in another version of XCode (version 9.0.1) the error did not appear.
Most commonly this error is caused by the chosen answer, yet I had this error appear once by accident when dragging framework files into my new project folder. I clicked to delete the frameworks but accidentally pressed to only 'Remove Reference' to the frameworks rather than to actually delete the files completely. At this point if I opened my project folder in Finder I saw files like 'CoreLocation' and 'AudioToolbox' there. Deleting these files from the project folder and cleaning the project fixed the issue.