The iAd advertising platform provides developers new opportunities to generate revenue and promote their apps. You add banner or full-screen advertisements to your app’s user interface; Apple sells advertising space and delivers ads to fill these spaces. You earn revenue when users view or interact with ads displayed by your app.
At a Glance
The iAd framework was introduced in iOS 4.0, and does the work necessary to download advertisements from the iAd App Network. Your primary responsibility is to design your user interface to accomodate space for advertisements.
To Use iAd In Your App, You Must Join the iAd App Network
Before you start adding advertising support to your app, you must first agree to the iAd App Network Contract and complete relevant tax and banking information in iTunes Connect. Further, to be eligible to receive ads, you must integrate the iAd Framework in your app before you submit the app for review.
For more information on the iAd App Network, see http://developer.apple.com/iad/.
Banner Views Use a Portion of the Screen to Display a Banner Ad
ADBannerView class allows you to dedicate a portion of a user interface screen to display a banner ad. Once created, a banner view automatically downloads new advertisements to display to the user. A user taps a banner to interact with the ad’s content.
Full-Screen Ads Provide Larger Advertisements
ADInterstitialAd class allows you to display full-screen advertisements in your app. You can add a full-screen advertisement as a page of content alongside other pages of content provided by your app, or you can display a full-screen advertisement modally when your app transitions from one screen to another. As with a banner ad, a user taps a full-screen advertisement to launch the ad’s rich content.
Pause Nonessential Activities While Users Interact with Advertisements
When the user taps on an advertisement, iAd typically covers the screen and displays an interactive advertisement. Your app continues to run, but the user cannot see or interact with your app’s user interface. Instead, the user interacts with the rich media experience provided by the displayed advertisement. While an advertisement is displayed, your app’s activities should be scaled back, and features that require the user to see or hear your app’s user interface should be paused. Your app must respond to low-memory warnings and release objects that can be easily recreated after the user finishes interacting with the advertisement.
Canceling Advertising Negatively Impacts Your App
While the user interacts with an advertisement, your app continues to receive events. Once the user finishes the advertising action, control returns to your app. However, if your app receives an event that requires the user’s immediate attention, your app can programmatically cancel the advertisement to restore its user interface. Your app should only cancel advertising when it urgently needs the user’s attention. Frequently canceling advertisements can reduce the revenue generated by your app. It may also affect the inventory of advertisements that are offered to your app.
Validate Your iAd Support Before Releasing Your App
When you build and run your app in Xcode, iAd automatically serves test advertisements to your app. You should confirm that your app properly supports the guidelines and recommendations found in this programming guide as well as those found in the iOS Human Interface Guidelines.
This guide assumes you know how to program in Objective-C. iAd uses views and view controllers to display advertisements, so you should be familiar with view programming and the use of view controllers to manage your user interface. To learn more about view programming, see View Programming Guide for iOS. To learn more about view controllers, see View Controller Programming Guide for iOS.
As a result of a user tapping an ad, iAd may move your app into the background to launch another app. You should be familiar with the multitasking behavior introduced in iOS 4.0. See App Programming Guide for iOS.
For sample code that demonstrates how to use banner ads, see iAdSuite.
For sample code that demonstrates how to use full-screen ads, see iAdInterstitialSuite
For guidance and restrictions on how your app should display advertisements, see iOS Human Interface Guidelines.
For details about the classes and protocols in the iAd framework, see iAd Framework Reference.