iphone - Admob test devices not showing simulator udid -


i implementing admob on ios app.

i downloaded admob sample code , when tried run on simulator, console saying "to test ads on device, call: request.testdevices = nsarray arraywithobjects:@"gad_simulator_id", nil];".

so, added mac udid , testing device udid array , set request. but, still, app showing default banner instead of ads admob account. console saying same above message. have had idea missing here? here code.

self.adbanner = [[[gadbannerview alloc] initwithadsize:kgadadsizebanner                                               origin:origin]; self.adbanner.adunitid = ksampleadunitid; self.adbanner.delegate = self; [self.adbanner setrootviewcontroller:self]; [self.view addsubview:self.adbanner]; self.adbanner.center = cgpointmake(self.view.center.x, self.adbanner.center.y); gadrequest *request = [gadrequest request]; request.testing = yes; request.testdevices = [nsarray arraywithobjects: @"xxxx-xxxx-xxxx-xxxx-xxxxxxxx",                                             @"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",                                             nil]; [self.adbanner loadrequest:request]; 

btw, replaced above ksampleadunitid admob publisher id , xxx mac id , device id.

enable test ads

on idevice, go settings > privacy > advertising , disable 'limit ad tracking' option. when run app on hardware, check xcode's console: there see id, can add testdevices array.


Comments

Popular posts from this blog

php - Why I am getting the Error "Commands out of sync; you can't run this command now" -

linux - Does gcc have any options to add version info in ELF binary file? -

java - Are there any classes that implement javax.persistence.Parameter<T>? -