All of a sudden, I get a warning on the code used to initialize the Google Mobile Ads SDK. (It had been working for weeks before with no warning, but now it seems there's a new way to write the code.)
This is the code I have:
GADMobileAds.configure(withApplicationID: "ca-app-pub-################~##########")
But it gives me this warning: 'configure(withApplicationID:)' is deprecated: Use [GADMobileAds.sharedInstance startWithCompletionHandler:]
I've tried to rewrite it like this (with and without the square brackets):
GADMobileAds.sharedInstance startWithCompletionHandler: "ca-app-pub-################~##########"
But it just gives me an error that it expected a ;.
How should I write this? Thank you!
Next to "Devices", click Edit. The section should expand and you'll be able to choose operating systems, device models, as well as carriers and Wi-Fi. Operating systems: Choose to show your ads to people on all operating systems or target specific ones. Example: Android or iOS.
Veer Arjun Busani(Mobile Ads SDK Team) The deprecation is only for Android Mobile Ads SDK and not for iOS. In any case, the easiest way to know your Mobile Ads SDK version would be to record a Charles session with your app and look at the request response. It would have your SDKs version number.
The Google Mobile Ads SDK for Ad Manager is a mobile advertising platform that you can use to generate revenue from your app.
1) Add the follow in Info.plist
<key>GADApplicationIdentifier</key>
<string>ca-app-pub-3940256099942544~1458002511</string>
2) in AppDelegate
GADMobileAds.sharedInstance().start(completionHandler: nil)
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