I have an app in iOS TestFlight. It has AdMob ads. I originally deployed the app with the demo unit id and the app showed demo ads. So far, so good. I got my AdMob account approved and I added the real unit ID to my app as per the instructions. I ran the app on the simulator and the banner shows up, albeit with demo ads. So, I deployed this version to TestFlight, and now the app in TestFlight doesn't show any banner.
I don't know what is going wrong. It should at least display the demo banner. I would have to add some kind of logging to diagnose the issue.
So, I checked the documentation here and here.
I added my physical iPhone as a Test Device in the AdMob console, but my device still doesn't display any ads and the shake gesture does nothing.
The documentation says that I need to have the app in the store before I can serve ads, but it's a chicken-and-egg scenario. I want to make sure the ads are working before I deploy them to the store. I would at least like the demo banner to display, but even that won't display right now.
I also followed this documentation. If I add this test Swift code, the banner shows up. But this doesn't really help me much because it requires that I put the specific device id into the app.
GADMobileAds.sharedInstance().requestConfiguration.testDeviceIdentifiers = [ "[DEVICE ID]" ]
My two options are to roll back to the demo ad unit id which displays the incorrect demo banner or just hope for the best. Can anyone recommend advice here, or at least explain how I can get the ads to display on the test device?
Edit: The app works fine with the demo advert but it got rejected from the Apple store because the ad says "Test". It's a chicken and egg scenario.