Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode AdMob's GAD_SIMULATOR_ID undeclared identifier error

Tags:

xcode

ios

admob

I downloaded AdMob SDK iOS 7.0.0 yesterday and i followed Google AdMob's iOS guide.

GADRequest *request = [GADRequest request];

request.testDevices= @[ GAD_SIMULATOR_ID, @"2077ef9a63d2b398840261c8221a0c9b"];

When I put in the above line I get an Xcode error stating 'Use of undeclared identifier 'GAD_SIMULATOR_ID'

However, on iOS guide in Google's AdMob it states that's how to get a test banner on iOS device. So why doesn't it work?

like image 957
Alex Avatar asked Feb 10 '15 01:02

Alex


1 Answers

Starting from the SDK version 7.0.0 you no longer need to precise GAD_SIMULATOR_ID so as to run test ads in the simulator. It is now done automatically.

Please, have a look at the banner example here: it is precised in the comments.

EDIT:

From SDK 7.0 to 7.1 you can use kDFPSimulatorID

Starting from the SDK 7.2 you can use kGADSimulatorID

like image 148
Chakir Avatar answered Sep 19 '22 16:09

Chakir