Ios 模拟机或设备上均未显示广告移动广告

Ios 模拟机或设备上均未显示广告移动广告,ios,admob,cocos2d-x,ads,Ios,Admob,Cocos2d X,Ads,在我的cocos2d-x项目中,我完成了以下在设备/模拟器上显示广告的代码 GADInterstitial *gAdInterstitial; = [[GADInterstitial alloc] init]; gAdInterstitial.adUnitID = @gAdUnitID; NSLog(@"Add Unit Id %@",gAdInterstitial.adUnitID); //AdMob GADRequest *request = [GAD

在我的cocos2d-x项目中,我完成了以下在设备/模拟器上显示广告的代码

    GADInterstitial *gAdInterstitial; = [[GADInterstitial alloc] init];
    gAdInterstitial.adUnitID = @gAdUnitID;
    NSLog(@"Add Unit Id %@",gAdInterstitial.adUnitID);
    //AdMob
    GADRequest *request = [GADRequest request];
//        request.testDevices = [NSArray arrayWithObjects:GAD_SIMULATOR_ID, nil];
//    request.testDevices = [NSArray arrayWithObjects:GAD_SIMULATOR_ID,@"122189cf8ed3c83551f5df0585f4694f410f5041", @"eb26e6181da2a2da39f3410cd29c4c2c26ac19a6", nil];
    request.testing = YES;
    request.testDevices = @[GAD_SIMULATOR_ID];
    [gAdInterstitial loadRequest:request];
    gAdInterstitial.delegate = self;

这段代码是在rootviewcontroller类和iOS的appcontroller类中完成的。问题是,即使在网络上,它也没有显示任何广告

检查您的机组Id,并在 request.testDevices=@[GAD_模拟器_ID]; 指定模拟器id或设备id

将测试设置为“是”时进行测试并不重要,您可以使用生产设置运行,但避免单击ads。

请在loadRequest之前尝试设置GADITIAL的委托: