7rs7
7rs7

Reputation: 11

How to integrate AdMob ads in Swift 3?

Constantly struggling to implement AdMob ads into my iOS app manually but no luck - I have inserted GoogleMobileAds.framework in project folder where the ViewController.swift and AppDelegate.swift was & added all required frameworks under 'Linked Frameworks and Libraries', changed Bitcode to 'NO' in Build Settings

Typed 'import GoogleMobileAds' in ViewControllerSwift.swift but it states 'No such module GoogleMobileAds'

What am I missing here? Im using XCode 8.3.3 and Swift 3

Upvotes: 1

Views: 469

Answers (2)

Vyacheslav
Vyacheslav

Reputation: 27221

https://firebase.google.com/docs/ios/setup

Read the manuals more carefully

  1. install cocoapods https://guides.cocoapods.org/using/getting-started.html

$ sudo gem install cocoapods

2.

$ cd your-project directory
$ pod init
  1. Edit PodFile: add this code inside target rows
pod 'Firebase/Core'
pod 'Firebase/Admob'

4.

$ pod install
$ open your-project.xcworkspace

Upvotes: 1

Jitendra Modi
Jitendra Modi

Reputation: 2394

Admob is part of Firebase now so install pod files below and then try to import GoogleMobileAds

pod 'Firebase/Core'
pod 'Firebase/AdMob'

Upvotes: 1

Related Questions