【发布时间】:2014-09-16 16:02:05
【问题描述】:
我无法使用 iOS 的 ti.admob 模块(版本 1.6.0)显示和 admob 横幅。
我的代码与 ti.admob 示例中的代码类似:
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( );
我总是收到“接收广告失败!”在我的 iOS 模拟器中。但是当我取消注释 testDevices 行时,我会收到一个测试横幅图像。我还在设备 (iPhone) 中对其进行了测试,它具有与之前概述的相同的行为广告。 请注意,直到 8 月 15 日左右,广告甚至在模拟器上都可以正常工作。之后他们再也没有工作过。请注意,他们确实做到了,并继续以接近 100% 的填充率在 android 上工作。
我正在使用https://github.com/appcelerator/titanium_modules/tree/master/admob/mobile/ios 的模块 我什至尝试将其更新为使用最新的 sdk(版本 6.11.0),但仍然无法正常工作。
是否可以在 iOS 模拟器中获得真正的 admob 横幅? 你有什么建议吗?
版本: 操作系统:OSX 10.8.5 iOS模拟器:7.1 钛 SDK:3.2.3 ti.admob 模块:1.6.0 带有 iOS 7.1 的 iPhone
提前致谢。
【问题讨论】:
标签: ios titanium admob titanium-modules