module 'GoogleMobileAds' not found. Xcode 7 beta, iOS Unity build

3,572 views
Skip to first unread message

dries lamberechts

unread,
Jul 11, 2015, 3:56:03 PM7/11/15
to google-adm...@googlegroups.com
Hi everyone,

I've been searching for a solution for this but I can't seem to find it anywhere so I thought about posting here.

I'm running Xcode 7 beta on OS X Yosemite and I'm trying to create an iOS build from a project that came from Unity (which I've created on Windows 8)
The problem is, as described in the title, that I get the error in GADURequest.m that the module GoogleMobileAds is not found (that's at the @import line).

I've added all necessary frameworks to the Build Phases and I've set the Base iOS SDK to 7.0. I've also added the -ObjC flag to the linker settings in both the Project
and the Target.

I've been reading on the Google Developers page that explains what I need to do but I still get the same error.

Is there a simple solution for this?

Thanks in advance,
Dries

dries lamberechts

unread,
Jul 12, 2015, 1:36:46 PM7/12/15
to google-adm...@googlegroups.com
I've gotten to the point where Xcode can find the module by setting the path to the .framework in the Build Settings.
Now it throws me the following error when building:

"Expected ':'" in the GADInterstitial.h file.
It's thrown at this line:

/// Example AdMob ad unit ID: @"ca-app-pub-0123456789012345/0123456789"

- (instancetype)initWithAdUnitID:(NSString *)adUnitID NS_DESIGNATED_INITIALIZER;


Since I'm not an ObjC programmer I don't know what to do.

Is there a simple solution for this?


Elton Kent

unread,
Jul 13, 2015, 4:19:41 PM7/13/15
to google-adm...@googlegroups.com, drieslam...@gmail.com
Hi Dries,
Xcode 7 does have an issue with the Mobile Ads Framework where the framework search paths don't get set automatically. You would have to add it manually by right-clicking on the project and selecting "Add files to.."

Cheers,
Elton Kent
Mobile Ads SDK Team

dries lamberechts

unread,
Jul 13, 2015, 4:56:56 PM7/13/15
to google-adm...@googlegroups.com, drieslam...@gmail.com
Hi Elton,

that's what I did. I added the framework manually to the project and then set the "Framework Search Path" to the folder where the .framework file is.
After that Xcode didn't say it didn't found the framework anymore but it threw the error in my second post in this thread.

Thanks for helping.

Elton Kent

unread,
Jul 13, 2015, 5:01:47 PM7/13/15
to google-adm...@googlegroups.com, drieslam...@gmail.com
Hi Dries,
It's complaining that the "GADInterstitial.h" is not included in your source file. You would use the include statement as such.

#import "GADInterstitial.h"

Cheers,
Elton

dries lamberechts

unread,
Jul 13, 2015, 5:38:12 PM7/13/15
to google-adm...@googlegroups.com, drieslam...@gmail.com
Hi Elton,

first of all, thanks for the quick response.
I don't think we're on the same page though.

Here's a screenshot of my Xcode error: http://i.imgur.com/BCPkHQV.png

These are the things I've done to get to this point:
- Added the GoogleMobileAds framework (and let it copy to the project folder)
- Added the path to the folder where the framework is placed to the "Framework Search Paths" in Build Settings
- Added the Other Linked Flag -ObjC (as described somewhere on the internet)
- Enabled modules in the Build Settings

That is all. I hope this makes it clearer.

Kind regards.

Elton Kent

unread,
Jul 14, 2015, 11:54:23 AM7/14/15
to google-adm...@googlegroups.com, drieslam...@gmail.com
Hi Dries,
Thanks for the screenshot. It appears to be an issue with an SDK related class which is unlikely. Since Xcode 7 is fairly new and currently in public beta, we're working on bringing support to many of its new features. I would recommend working on Xcode 6 for the moment and since you're working with Unity, you could make use of the official Unity plugin for the Mobile Ads SDK.

Cheers,
Elton Kent
Mobile Ads SDK Team

dries lamberechts

unread,
Jul 14, 2015, 3:48:16 PM7/14/15
to google-adm...@googlegroups.com, drieslam...@gmail.com
Hi Elton,

I thought it might be something to do with Xcode itself. I'm using the beta version to push the app to my phone for free primarily so I'll switch to 6 when I've paid the developer thing for Apple.
I've been using the Unity plugin but it seems like Xcode still needs the SDK as well so that's why I've included it. Is this wrong? Should I set the Framework Search Path to the files that are
imported with that package (GoogleMobileAds Unity plugin) in the Unity Xcode build?

Kind regards

Elton Kent

unread,
Jul 14, 2015, 4:08:31 PM7/14/15
to google-adm...@googlegroups.com, drieslam...@gmail.com
That's correct. You would need to include the SDK's framework manually after you generate the Xcode project with unity. 

Thanks,
Elton Kent
Mobile Ads SDK Team

Per Malmberg

unread,
Jul 21, 2015, 3:05:02 PM7/21/15
to google-adm...@googlegroups.com, drieslam...@gmail.com
I have the exact same issue using xcode 5.1. I tried setting the path to the folder of the framework file but I still get the same error. Upgrading to xcode 6.4 now and hoping it'll work better.
I tried creating a bare bones project with the plugin and the example code from github. Same problem :/ 

Elton Kent

unread,
Jul 22, 2015, 12:07:05 PM7/22/15
to Google Mobile Ads SDK Developers, shaka...@gmail.com, drieslam...@gmail.com
Hi Per,
As I indicated earlier, it's advisable to stay on Xcode 6 for now until 7 comes out of beta. Could you elaborate a bit on the details of this issue in 5.1?

Thanks,
Elton Kent
Mobile Ads SDK Team

Per Malmberg

unread,
Jul 27, 2015, 1:32:41 PM7/27/15
to Google Mobile Ads SDK Developers, drieslam...@gmail.com, mobileadssdk-...@google.com
Yeah after upgrading to 6.4 it works fine.
In 5.1 I got the "module GoogleMobileAds not found"-error even though I'd added the framework to the project and the search path to the framework in the build settings.


Jaime Sierra Silva

unread,
Dec 13, 2015, 7:49:17 AM12/13/15
to Google Mobile Ads SDK Developers, drieslam...@gmail.com
Very very thanks you, you post resoved my problem.

Very lucky,


Jaime
Reply all
Reply to author
Forward
0 new messages