Ios – AdMob 7.3.1 and Swift 2.0 – Module not found

admobiosmoduleswiftswift2

I have a problem using the Google AdMob Framework with Swift 2.0. I'm using AdMob for the first time so I do not know if the problem is with AdMob or Swift 2.0.

I have included the AdMob Framework and import it like that in my ViewController:

import GoogleMobileAds

The error I am getting is:

No such Module GoogleMobileAds

A bridging header is also not working:

#import <GoogleMobileAds/GoogleMobileAds.h>

The Error:

GoogleMobileAds/GoogleMobileAds.h file not found

How should I include AdMob? I have tested AdMob 6.12.2 and included it via the bridging header and it works.

The previous posts from other users didn't help me – there were no solutions for this problem.

Best Solution

Right click your project -> Show in Finder -> Create New Folder and copy GoogleMobileAds.framework after open project.

Select project-> Targets -> Build Phases -> Link Binary With Libraries -> click "+" button -> click Add other.. button -> select GoogleMobileAds.framework and click Open button.

Restart your app then compile and import GoogleMobileAds to your swift view controller