Show test ads on real device
This is my code:
let request = GADRequest() request.testDevices = [kGADSimulatorID, "XXXX2F32d69CCA859FFB559D0FEA3CF6483D08A6"] adView.load(request)
Where XXXX is my UDID of my iPhone. Why do I get real ads and not test ads on my iPhone? Test ads on the simulator works. Thank you. Tried the UDID in uppercase and lowercase.
3 Solutions Collect From Internet About “Show test ads on real device”
This fixed it for me!
Product -> Scheme -> Arguments -> Environment Variables if there is a key: OS_ACTIVITY_MODE, disable/remove it.
As mentioned in admob guide
while running the app in device you get the below log
<Google> To get test ads on this device, call: request.testDevices = @[ @"2077ef9a63d2b398840261c8221a0c9b" ];
use that id instead of
As I understood your, I concate your UDID and ID in the log. This is wrong.
You this – pure ID :
let request = GADRequest() request.testDevices = [kGADSimulatorID, "2F32d69CCA859FFB559D0FEA3CF6483D08A6"] adView.load(request)
- Reimplement UIView block based animation methods with custom easing curve
- Getting data from the Info plist
- iOS URL Requests. Semaphore issues
- “Install of Apple Watch Application never finished” Error when deploying watch kit app to device
- Error Upload TestFlight : Invalid IPA / dSYM not found
- Continuous integration with Xcode Bots
- How to create subscript characters that's not in Unicode in iOS
- Adding system header search path to Xcode
- Today Extension has a title, but no body iOS 8
- How can I make phone call in Objective C?
- Animate CAShapeLayer path on animated bounds change
- Dynamic UITableCellView height
- Could not load the image referenced from a nib in the bundle running on device
- How to catch an exception in Swift
- how to convert UIView to UIImage without background?