Include of non-modular header inside framework module 'GoogleMobileAds'

3,871 views
Skip to first unread message

Marco Muccinelli

unread,
Jul 22, 2015, 10:07:42 AM7/22/15
to Google Mobile Ads SDK Developers
Hi,
I'm trying to install Google-Mobile-Ads-SDK pod (versione 7.3.1) with CocoaPods 0.38.0 when I can't build because precomplier error "Include of non-modular header inside framework module 'GoogleMobileAds'". I'm using Objective-C inside Xcode 6.3.2.
Thanks.

Schermata 2015-07-22 alle 16.06.26.png

Elton Kent

unread,
Jul 22, 2015, 4:23:29 PM7/22/15
to Google Mobile Ads SDK Developers, mucc...@gmail.com
Hi Marco,
Try this.
  • In Xcode, select the header file in the project explorer.
  • To your right, look for the "Target Membership" panel (should be somewhere to your extreme right in the middle).
  •  Now change that from "project" to "public". 

Cheers,
Elton Kent
Mobile Ads SDK Team

Marco Muccinelli

unread,
Jul 23, 2015, 3:28:06 AM7/23/15
to Google Mobile Ads SDK Developers, mobileadssdk-...@google.com
Hi,
I don't think this could be a solution in a CocoaPods environment. I took you a screenshot to show you why.

Elton Kent

unread,
Jul 23, 2015, 4:45:32 PM7/23/15
to Google Mobile Ads SDK Developers, mucc...@gmail.com, mucc...@gmail.com
Hi Marco,
I just ran 'pod install' on all the Google ad samples and wasn't able to reproduce what you describe. I suspect that there could be something wrong with your pod file setup. Could you share your pod script to help narrow down on the problem?

Thanks,
Elton Kent
Mobile Ads SDK Team

Marco Muccinelli

unread,
Aug 1, 2015, 11:57:41 AM8/1/15
to Google Mobile Ads SDK Developers, mucc...@gmail.com
You can checkout my repo branch.
Thanks.

Marco Muccinelli

unread,
Aug 3, 2015, 7:11:48 AM8/3/15
to Google Mobile Ads SDK Developers, mucc...@gmail.com
Solved. Thank you :)

Elton Kent

unread,
Aug 3, 2015, 4:28:38 PM8/3/15
to Google Mobile Ads SDK Developers, mucc...@gmail.com
Hi Mario,
Glad you resolved it. Could post the solution to benefit anyone else facing a similar issue?

Thanks,
Elton Kent
Mobile Ads SDK Team

Marco Muccinelli

unread,
Aug 4, 2015, 3:49:45 AM8/4/15
to Google Mobile Ads SDK Developers, mucc...@gmail.com
Sure! I was just importing headers without angle brackets. I corrected #import "GADBannerView.h" to #import <GoogleMobileAds/GADBannerView.h>. Stupid error by me :)
Bye

tien dh

unread,
Nov 4, 2015, 3:56:20 PM11/4/15
to Google Mobile Ads SDK Developers, mucc...@gmail.com
By default, cocoapods use angle brackets <> to import file. I'm having the same problem and stuck.

tien dh

unread,
Nov 4, 2015, 4:07:17 PM11/4/15
to Google Mobile Ads SDK Developers, mucc...@gmail.com
The best solution, according to me, is to manually include admob sdk. This fixes my issue

Radu Savutiu

unread,
Nov 13, 2015, 4:00:51 PM11/13/15
to Google Mobile Ads SDK Developers
I could not add the framework manually.
Using Pods, it gave out this mistake. What I had to do in the end was refactor every import <GoogleMobileAds/GADActualRealHeader.h> to be "GADActualRealHeader".

Seems like it does not recognise it should have a GoogleMobileAds lib.

Problem keeps appearing and disappearing on different branches and new pod installs.

I mean I know it's Google working on iOS platform, but still it should not be THAT bad.

Tristan Emrich

unread,
Nov 13, 2015, 6:20:43 PM11/13/15
to Google Mobile Ads SDK Developers
Hi Everyone,

Just a general comment:  

If you want to add the framework manually, make sure you remove any CocoaPod stuff related to GoogleMobileAds SDK from your project. Then go to our developer site to download the latest version of the SDK. Once you unzip the file, you will see a folder containing GoogleMobileAds.framework. In Xcode, right click on your project folder (top level in Project Navigator), select add files to "Your Project Name" and choose GoogleMobileAds.framework. 

From there, you should be able to import Google Mobile Ads into your project files. 

ObjC
@import GoogleMobileAds;

Swift
import GoogleMobileAds

Jaime Sierra Silva

unread,
Dec 13, 2015, 7:02:03 AM12/13/15
to Google Mobile Ads SDK Developers
Hi,

I'm to install SDK manually but in my XCode not found files .h, I don't use SDK of google Admob.

Please Help me.

Jaime

Tristan Emrich

unread,
Dec 14, 2015, 10:19:18 AM12/14/15
to Google Mobile Ads SDK Developers
Hi Jaime,

I can definitely help out if you are experiencing issues with including the Google Mobile Ads SDK into your Xcode project. 

Please let me know if you are using our SDK and having trouble including it into your project.

Thank you!
Tristan
Reply all
Reply to author
Forward
0 new messages