I have a very simple View Controller set up for the main purpose of trying to get the test Native ads running, using Google Mobile Ads 7.20.0.
With my code that's posted below, the test adUnitID that Google provides in their Admob repo does not work. No ads ever show. If I use the production adUnitID, however, it shows fine. I need the test ads to show for development purposes. I'm not using Firebase.
import GoogleMobileAds
import UIKit
class ViewController: UIViewController {
let testID = "ca-app-pub-3940256099942544/8897359316"
@IBOutlet weak var adView: GADNativeExpressAdView! // Using storyboard here.
override func viewDidLoad() {
super.viewDidLoad()
adView.adUnitID = testID
adView.rootViewController = self
let request = GADRequest()
request.testDevices = [kGADSimulatorID]
adView.load(request)
}
}
Here's what prints out to the console
[DYMTLInitPlatform] platform initialization successful
[MC] System group container for systemgroup.com.apple.configurationprofiles path is /private/var/containers/Shared/SystemGroup/systemgroup.com.apple.configurationprofiles
[MC] Reading from public effective user settings.
<Google> To get test ads on this device, call: request.testDevices = @[ @"abc123" ];
Metal GPU Frame Capture Enabled
Metal API Validation Enabled
libMobileGestalt MobileGestaltSupport.m:153: pid 1983 (Native Admob Test) does not have sandbox access for frZQaeyWLUvLjeuEK43hmg and IS NOT appropriately entitled
libMobileGestalt MobileGestalt.c:550: no access to InverseDeviceID (see <rdar://problem/11744455>)
Does anything look glaringly off in the above? What can I do to get the Google test ad ID working with Native Ad Express?