TomSawyer TomSawyer - 4 months ago 289
iOS Question

iOS: Wrong instruction in installing Google Mobile Ads SDK?

I'm following this tutorial to put Google Ad on my page: https://firebase.google.com/docs/admob/ios/quick-start

At the step:

GADMobileAds.configureWithApplicationID("ca-app-pub-8123415297019784~8909888406");


And the error occurred:

AppDelegate.swift:58:9: Type 'GADMobileAds' has no member 'configureWithApplicationID'


And after the checking, i see there is no member
configureWithApplicationID
.

What's wrong with this instruction?
And why i have to install Firebase/Core in this version?

Here are methods in GADMobileAds, there is no configureWithApplicationID like Objective C version. How stupid is that http://i.imgur.com/Od0vkPg.png

Answer

@bourvill I've found the way to work around. Remove the cocoapods line from the instruction and replace with this line: pod 'Google-Mobile-Ads-SDK' . It will install the google sdk version 7.9.0 and you'll see the configureWithApplicationID method. This is the error from Google for Swift