Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Facebook error Include of non-modular header inside framework module

I am getting the following error when i tried to integrate Parse.com and Facebook SDK.

The error is as follows:

enter image description here

The library files that i added.

enter image description here

Update - After changing YES to "Allow non-modular includes in Framework modules"

enter image description here

like image 796
Illep Avatar asked Apr 21 '15 12:04

Illep


People also ask

How to fix include of non-modular header inside Framework module class?

Error : Include of non-modular header inside framework module class : These file not found in the project. Show activity on this post. Make sure the header files are publicly available as part of the framework's public headers. Goto Framework -> Target -> Build Phases and drag to move the relevant header files from Project to Public.

Why does modulemap fail to import some header?

If any of the public header files you have mentioned in your module.modulemap have import statements that are not mentioned in modulemap, this will give you the error. Since it tries to import some header that is not declared as modular (in module.modulemap), it breaks the modularity of the framework.

Why won't Xcode Let Me import non-modular components into a framework?

Try going Build Settings under "Target" and set "Allow Non-modular Includes in Framework Modules" to YES. The real answer is that the location of the imports needs to be changed by the library owner. Those files ifaddrs.h, arpa/inet.h, sys/types.h are getting imported in a .h file in a framework, which Xcode doesn't like.

What does allow non-module includes mean?

Ideally we should try and aim to have Allow non-module includes set to NO. Setting this to YES in most cases means you're doing something wrong. The setting translates to "Allow importing random header files on disk that aren't otherwise part of the module".


2 Answers

Go to Build Settings and search for "Allow non-modular includes in Framework modules" and change it to YES

like image 110
dizzyboy Avatar answered Oct 13 '22 05:10

dizzyboy


If you are developing with Swift you have to remove the ".modulemap" file under the "Modules" folder in every framework from Facebook you have included. That worked for me.

See this link: https://developers.facebook.com/docs/ios/troubleshooting#xcode_link

like image 21
ezefire Avatar answered Oct 13 '22 03:10

ezefire