Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

xCode 7 error: include of non-modular header inside framework module with Google Maps

I updated to xCode 7.1 today and tried to build my app but I'm getting this error:

enter image description here

I have already tried going to Build Settings under "Target" and set "Allow Non-modular Includes in Framework Modules" to YES but that didn't solve this issue.

UPDATE: Since this was preventing me from compiling and hindering my progress in terms of development, I recommend you download an older version of xCode from Apple (https://developer.apple.com/downloads/ make sure to login). You can download version 7.0.1 from the link and at least continue development.

This is what I've done and I can continue development.

I know this is not a fix, but its workaround for the people who wish to continue development.

like image 598
goelv Avatar asked Oct 22 '15 23:10

goelv


3 Answers

Google has updated its SDK to 1.10.5, Just Reinstall Pod and it should work fine. I was facing same issue and now all issues are fixed after pod reinstallation.

like image 73
ak2g Avatar answered Oct 19 '22 21:10

ak2g


I ended up having to create an Objective-C bridging header file and adding #import <GoogleMaps/GoogleMaps.h> whereas I hadn't needed one previously since I was using Cocoapods in a Swift project and the use_frameworks! setting had previously taken care of this.

Here's instructions for how to create the Objective-C bridging header file: (https://developer.apple.com/library/ios/documentation/Swift/Conceptual/BuildingCocoaApps/MixandMatch.html)

like image 9
mpatzer Avatar answered Oct 19 '22 19:10

mpatzer


https://forums.developer.apple.com/thread/23554

Just remove the header search paths in build settings. In new Xcode versions (after 7.0 I guess) you need to look for the headers by linking frameworks and not by linking header files directly.

like image 2
Fedor Patutinskiy Avatar answered Oct 19 '22 21:10

Fedor Patutinskiy