Creating swift cocoa touch framework with objective-c files

898 Views Asked by At

I'm trying to build a Cocoa Touch Framework in Swift with AFNetworking integrated, among other things... in xCode 6.0.1 I keep getting the "include of non-modular header inside framework module 'MyFrameworkName' when I include the .h file in the MyFrameworkName.h file.

I've already set the "Allow non-modular includes in Framwork modules" to YES, though this keeps happening...

It's going to keep happening

Please advice...

Thanks.

1

There are 1 best solutions below

2
johnnyclem On

You need to mark each header your framework will provide as "Public" rather than "Private" or "Project"

Click on the .h file in question and look in the File Inspector on the right side of Xcode (you can bring up the File Inspector from View->Utilities->Show File Inspector)

Then change the dropdown menu from "Project" or "Private"

header included in Framework as a Project header

to "Public"

header included in Framework as a Public header