Show test ads on a real device

This is my code:

let request = GADRequest()
request.testDevices = [kGADSimulatorID, "XXXX2F32d69CCA859FFB559D0FEA3CF6483D08A6"]
adView.load(request)

Where XXXX is my UDID of my iPhone. Why do I have really real ads and not test ads on my iPhone? Simulator test ads work. Thank. Tried UDID in upper and lower case.

+4
source share
3 answers

It fixed it for me!

Product → Scheme → Arguments → Environment variables, if there is a key: OS_ACTIVITY_MODE, disable / delete it.

+1
source

As mentioned in the admob guide

during application launch on the device you get the following log

<Google> To get test ads on this device, call: request.testDevices = @[
@"2077ef9a63d2b398840261c8221a0c9b" ];

use this identifier instead UDID.

+1
source

As I understand yours, I will specify your UDID and ID in the log. It is not right.

You are a pure ID:

let request = GADRequest()
        request.testDevices = [kGADSimulatorID, "2F32d69CCA859FFB559D0FEA3CF6483D08A6"]
        adView.load(request)

https://firebase.google.com/docs/admob/ios/targeting

+1
source

Source: https://habr.com/ru/post/1673772/


All Articles