Hello, I can not display admob banner using ti.admob module (version 1.6.0) for iOS.
My code is similar to the code in the ti.admob example:
var Admob = require( 'ti.admob' ); var win = Ti.UI.createWindow( { backgroundColor: 'white' } ); var ad; win.add( ad = Admob.createView( { top: 0, left: 0, width: 320, height: 50, adUnitId: "ca-app-pub-####/####", adBackgroundColor: 'black', // You can get your device's id for testDevices by looking in the console log after the app launched //testDevices: [Admob.SIMULATOR_ID], dateOfBirth: new Date( 1985, 10, 1, 12, 1, 1 ), gender: 'male', keywords: '' } ) ); ad.addEventListener( 'didReceiveAd', function( ) { alert( 'Did receive ad!' ); } ); ad.addEventListener( 'didFailToReceiveAd', function( ) { alert( 'Failed to receive ad!' ); } ); win.open( );I always receive 'Failed to receive ad!' in my iOS simulator. But when I uncomment the testDevices line, I receive a test banner image. I also tested it in a device (iPhone) and it has the same behavior outlined before. Note that ads were working even on the simulator until around August 15th. After that they never worked again. Note they did and keep working on android with near 100% fill rate.
I’m using the module at https://github.com/appcelerator/titanium_modules/tree/master/admob/mobile/ios I even tried updating it to use the latest sdk (version 6.11.0) and it still didn’t work.
Is it possible to get a real admob banner in the iOS simulator?
Do you have any suggestion?
Versions:
- OS: OSX 10.8.5
- iOS simulator: 7.1
- Titanium sdk: 3.2.3
- ti.admob module: 1.6.0
- iphone with iOS 7.1
Thanks in advance.