let bannerView = GADBannerView(adSize: adSize)
bannerView.adUnitID = "ca-app-pub-3940256099942544/2934735716"
bannerView.rootViewController = rootViewController
let request = GADRequest()
bannerView.load(request)
bannerView.delegate = self
return bannerView
But I get this in the didFailToReceiveAdWithError delegate function:
bannerView:didFailToReceiveAdWithError: SDK tried to perform a networking task before being initialized.
If I observe the status after the Start() I see that Adapter Name: GADMobileAds, Description: <GADAdapterStatus: 0x6000033cdf50; state = Ready>
And Im trying to run on the test account.
Im using the latest SDK via Cocoapods.
I hope you have some suggestions as to what to try to get the test ads up and running?
Received error with domain: com.google.admob, code: 2,message: SDK tried to perform a networking task before being initialized., responseInfo: ** Response Info **
Response ID: (null)
Network: (null)
** Mediation line items **
,underLyingError: nil
|
||||||
AdMob App ID changed. Original, new: (nil), ca-app-pub-3940256099942544~.....
I have printet out the adapterStatusesByClassName when running GADMobileAds.sharedInstance().start:bannerView = GAMBannerView(adSize: GADAdSizeMediumRectangle)
bannerView.adUnitID = forAdId
bannerView.delegate = self
bannerView.rootViewController = rootViewController
let req = GAMRequest()
bannerView.load(req)Hi Jakob,
Thank you for your response.
Have you tried to remove this "~>" in your pod file? Also, have you tried connecting to another internet connection while trying to run your app? Could you please provide the following details via Reply privately to author option or send it directly to mobileads...@gmail.com? Kindly inform us on this thread if you sent it directly to the email provided.
Regards,
|
||||||
Hi Jakob,
Thank you for your response.
I'm glad to know that you are now able to determine the cause of the error and now able to fix it. If you have any other concerns for Google Mobile Ads SDK, just let us know.
I have created one SDK which have admob integrated. and The application which we used this SDK have also google ads itself. Now when application launch it call failed response with error message SDK tried to perform a networking task before being initialized.
Hi Rupendra,
Thank you for contacting the Mobile Ads SDK support team.
By reviewing your concern, I understand that one of your apps is facing an error “SDK tried to perform a networking task before being initialized”.
Kindly provide the below information for further investigation privately:
You can provide the following details via reply privately to the author option or directly provide it to the link below
![]() |
Mobile Ads SDK Team |