iAd ANE is a native extension to show iAd ads on iOS. It supports all native functions, allowing developers to fine-tune how advertisements are displayed. Even though the extension includes all size types and interstitials, Â the Apple ad network restricts the ad type by device. Banners can be used in iPhone/iPads, while interstitials can be used on iPad only.
In order to check if a banner type can be displayed, the extension has a method to check if interstitials are supported. It allows developers to selectively show ads based on the device running the application. This extension can be centralized and managed by the Ad Network ANE.
Sample
if(IAd.getInstance().supportDevice) { IAd.getInstance().showBanner(IAd.BANNER,IAdPosition.BOTTOM_CENTER); } // Check ane support. Apple does not provide Interstitial ad on iphone. if(IAd.getInstance().supportDevice&&IAd.getInstance().supportedInterstitial){ IAd.getInstance().addEventListener(IAdEvent.onInterstitialReceive,onAdReceived); IAd.getInstance().cacheInterstitial(); } protected function onAdReceived(event:IAdEvent):void { if(event.type == IAdEvent.onInterstitialReceive) { IAd.getInstance().showInterstitial(); } }
RT @as3gamegears: New: iAd ANE (native extension to show iAd ads on iOS) http://t.co/7YkyOnT93l #as3 #flash #gamedev
[…] resources for AS3. In this case it’s a great collection for any App developer. Like CameraRoll, iAd, Ad Network, etc… It’s a very exciting summary to get you started, and will save you […]