To get test ads on this device, call: request.testDevices = [NSArray arrayWithObjects:GAD_SIMULATOR_ID, nil];

前端 未结 6 760
情歌与酒
情歌与酒 2021-02-07 13:54

While i test Admob in simulator, it throws below error

To get test ads on this device, call: request.testDevices = [NSArray arrayWithObjects:GAD_SIMULATO

6条回答
  •  死守一世寂寞
    2021-02-07 14:00

    This works for me:

    (GADRequest *)request {
      GADRequest *request = [GADRequest request];
      // Make the request for a test ad. Put in an identifier for the simulator as well as any devices
      // you want to receive test ads.
      request.testDevices = @[
        // TODO: Add your device/simulator test identifiers here. Your device identifier is printed to
        // the console when the app is launched.
        GAD_SIMULATOR_ID
      ];
      return request;//thanks
    }  
    

提交回复
热议问题