Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Can not show ads on real iOS device. Working on Xcode simulator.

214 views
Skip to first unread message

Riley Bruce

unread,
Mar 21, 2019, 1:23:04 PM3/21/19
to Google Mobile Ads SDK Developers
I am trying to implement Admob for my iOS app. The form loads on the Xcode simulator devices. I am located in the US, but I have used the following code to test that the Consent SDK is working for European users. When I use this with a simulator, the form and ads load.

PACConsentInformation.sharedInstance.debugIdentifiers = ["SPECIFIC_TO_MY_DEVICE"]

PACConsentInformation.sharedInstance.debugGeography = PACDebugGeography.EEA


The form does not load on my physical device with this configuration. The form also did not load when I used testflightto distribute a test version to a test user in the EU. Subsequently, the ads did not load on "European" devices.

When the form should load, I get an error from the below block of code. Also. I get the error WebKitDomain Error 101. My ATS settings are set up in the plist per the Admob documentation.

thisForm.load {(_ error: Error?) -> Void in

            print("form load completion handler")

            if let error = error {

                print("Error loading form: \(error.localizedDescription)")

            } else {

                thisForm.present(from: self) { (error, userPrefersAdFree) in

                    print("in present handler")

                    if let error = error {

                        // Handle error.

                        print("error presenting: \(error.localizedDescription)")

                    } else if userPrefersAdFree {

                        //TODO: find a way to disable ads

                    } else {

                        // Check the user's consent choice.

                        //let status = PACConsentInformation.sharedInstance.consentStatus

                    }

                }

            }

        }



Does anyone know what may be causing these errors with physical devices? I have tried with a real ad id and a test ad id.

mobileadssdk...@google.com

unread,
Mar 21, 2019, 4:44:09 PM3/21/19
to Riley Bruce, Google Mobile Ads SDK Developers
Hello there,

Thanks for reaching out to us. I don't notice any specific issue with your code snippet but might I recommend that you first try with our sample app and go through the guidelines and try to present the the consent form that is bundled within the Consent SDK ? It might be a case that you are requesting a consent form that is not valid. 

Let us know if you need anything else.

Regards,
Deepika Uragayala
Mobile Ads SDK Team
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+ page:
    http://googleadsdeveloper.blogspot.com
    https://plus.google.com/115658573333388777174/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

--

---
You received this message because you are subscribed to the Google Groups "Google Mobile Ads SDK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads-sdk+unsub...@googlegroups.com.
To post to this group, send email to google-admob-ads-sdk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-admob-ads-sdk/0f84f6a6-7db0-41f0-854f-cb407c9cc826%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Riley Bruce

unread,
Mar 28, 2019, 1:30:20 PM3/28/19
to Google Mobile Ads SDK Developers
Hi!

Thank you for the response. In order to firmly fix the consentForm problem and implement a way to ask for consent, I made my own sets of views that ask for proper consent and tell the user the relevant information. These views are similar to Google's consent form. 

However, the problem about ads (real app ID and real banner ad ID) showing up persists. To be clear, the test ad ID works. I get this message from the adView delegate, didFailToReceiveWithErrors: "Error Domain=com.google.admob Code=1 "Request Error: No ad to show." UserInfo={NSLocalizedDescription=Request Error: No ad to show.}"

Scenarios where the ads works:
  • On any Xcode simulator
  • On my personal device when adRequest.testDevices = ["UNIQUE TO MY DEVICE"]
  • Using a test banner ad id on simulator or my personal device

Scenarios where ads do not show.
  • On my personal device when I do not include adRequest.testDevices = ["UNIQUE TO MY DEVICE"]
  • In any of the (less than 4) builds pushed to test users via test flight.

Questions:
1) Is there something wrong with my adMob account? Thus, production ads are not allowed to show?
2) Is this by design? meaning do production ads not work on real devices or testflight builds unless .testDevices is used?
     2a) If this is the case, will they work when I release on the app store?

I have shared my App ID and Ad ID in a private message. Please let me know if you need anymore information.

Thank you in advance for your help!!

mobileadssdk...@google.com

unread,
Mar 28, 2019, 3:23:27 PM3/28/19
to Riley Bruce, Google Mobile Ads SDK Developers
Hello Riley,

I have tested your Ad unit Id and I able to load ads without any issues with request.testDevice. Please note that this feature is mainly for testing purposes so that publishers can load production-looking ads without the risk of producing invalid clicks. When you are publishing your app, you can remove the  .testDevices from the Ad Request and you would be able to see live ads once the app is live. In few cases, publishers who has this issue got this issue resolved and have seen live ads when they published their apps. If you are still not seeing the ads on the published app, I would suggest that you reach out to AdMob Product Support Team via this troubleshooter or you may raise your concern to this Google AdMob Help Community


Regards,
Deepika Uragayala
Mobile Ads SDK Team
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+ page:
    http://googleadsdeveloper.blogspot.com
    https://plus.google.com/115658573333388777174/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads-sdk+unsubscrib...@googlegroups.com.

--

---
You received this message because you are subscribed to the Google Groups "Google Mobile Ads SDK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads-sdk+unsub...@googlegroups.com.
To post to this group, send email to google-admob-ads-sdk@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages