Skip to content
This repository has been archived by the owner on May 19, 2021. It is now read-only.

isTesting: true Not working #13

Closed
bflopez opened this issue Oct 7, 2016 · 3 comments · Fixed by #17
Closed

isTesting: true Not working #13

bflopez opened this issue Oct 7, 2016 · 3 comments · Fixed by #17

Comments

@bflopez
Copy link

bflopez commented Oct 7, 2016

I just switched over to this plugin and for some reason I cannot get the isTesting: true option to work for me. It displays real ads regardless. Am I doing something wrong?

AdMob.setOptions({
    publisherId: admobid,
     isTesting: true
  });      
AdMob.createBannerView();
@ratson
Copy link
Owner

ratson commented Oct 12, 2016

Which platform are you using? Do you able to run the example?

@bflopez
Copy link
Author

bflopez commented Oct 12, 2016

@ratson This is on iOS 10. I see a message on the console that says request.testDevices: XXXXXXXXXXXXXXXX and then another message that says "To get test ads on this device, call: the same number as before except the letters in the number are no longer capital. Could this be a lowercase/uppercase issue?

It works as in it shows me real ads even when isTesting is set to TRUE. It just doesn't show me test ads when it should be. Hope this helps

@vintage
Copy link
Collaborator

vintage commented Oct 22, 2016

Same situation for me. Here is my log output:

request.testDevices: 23A37F***D83FD05
<Google> To get test ads on this device, call: request.testDevices = @[ @"23a37f*****d83fd05" ];

So it can be as you suggested issue with lowercase/uppercase.

The ad is showing in the application, but it's definitely not a test ad. I've managed to fix the issue by changing the line https://github.com/ratson/cordova-plugin-admob-free/blob/master/src/ios/CDVAdMob.m#L413 to:

request.testDevices = @[ kGADSimulatorID, deviceId, [deviceId lowercaseString] ];

Does anyone know if it can impact the library in some "bad way"?

ratson pushed a commit that referenced this issue Oct 22, 2016
This closes #13 where it's impossible to test ads on the iOS devices due to the fact that testDevices should be set to lowercase according to the debug message.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants