3 Easy Fixes for iAds Mobile Advertising
Got an iPhone app that you want to monetize? iAds are served by Apple's built-in mobile advertising network and a popular way to earn money from your iPhone app. But we were reminded as we recently launched a client's iAds-based app that just because it's Apple's network doesn't mean setup is simple. For the best iAds experience for you and your users, check out these tricks:
- Make sure that your iOS test device's clock is correct. If your clock is out of sync when testing on an iOS device, you can get this dreaded error message:
"The operation couldn't be completed. Ad inventory unavailable"If, like me, you run into this issue, you might bang your head on the keyboard for a while, until, by chance, you look at the clock to see how long you've been banging your head... Save yourself the headache, and check the clock first.
- Make sure you have a good image placeholder for the launch of the app and when there are no ads available. You want a nice image in place for the time between when your app starts up and when the ad is delivered to the device. You cannot guarantee that you'll always have an ad, so make sure you have a good temporary image in place until it arrives.
Below is some sample code to serve the placeholder image. By setting your view as the delegate for the banner ad, you'll receive a simple notification when the banner has been delivered to the device. Your temporary banner (imgBanner in this case) is hidden when you receive the ad:
- (void)bannerViewDidLoadAd:(ADBannerView*)bannerDon't forget to handle the error condition:
- (void)bannerView:(ADBannerView*)banner didFailToReceiveAdWithError:(NSError*)errorThis image placeholder is also important to deal with issue #3...
if( banner.hidden== NO)
NSLog( @"%@\n", [error localizedDescription] );
- Don't submit your app images with the iAds Test logo. Make sure you have your default image banner in place. If you submit your images showing the test banner from Apple you will probably get rejected.
A little attention to correct setup now will clear the way for earning ad revenue from the millions of iPhone users later. Good luck!
- Dave Gruen