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.
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
There are two steps to solve your problem:
Put the path of GoogleMobileAds.framework
in Targets -> Build Settings "Framework Search Path"
Set "No" under Project -> Build Settings -> Enable Bitcode
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With