0

I'm testing admob ads on iOS simulators - and they show up fine with a line saying "TEST ADS".

That's great. Indeed, they are test ads, but the Google documentation asks us to use their ca-pub code for testing. I cannot keep on changing between my codes and theirs.

Am I doing anything wrong? My admob account shows everything is OK.

houba
  • 496
  • 7
  • 20

1 Answers1

1

You should avoid showing real ads during testing and development since it is against google policy.

What you can do is in code define the test value only in debug mode and it will not happen in a released version. If you are using swift you should be able to do as below

#if DEBUG
print("Not App Store build") // set variable to test id
#else
print("App Store build") // set variable to real id
#endif

See this thread on SO discussion on this that have some great answers explaining what to do