The iAd advertising platform provides developers new opportunities to generate revenue and promote their apps. You add banner or full-screen advertisements to your application’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 application.
At a Glance
The iAd framework was introduced in iOS 4.0, and does the work necessary to download advertisements from the iAd Network. Your primary responsibility is to design your user interface to accomodate space for advertisements.
To Use iAd In Your Application, You Must Join the iAd Network
Before you start adding advertising support to your application, you must first agree to the iAd Network agreement. Further, you must explicitly enable iAd for each application in iTunes Connect. As a part of the iAd Network, you control the kinds of ads that are delivered to your application.
For more information on the iAd Network, see http://developer.apple.com/iad/.
For more information in enabling iAd in your application, see iTunes Connect Developer Guide.
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 to iPad Applications
ADInterstitialAd class allows you to display full-screen advertisements in your application. You can add a full-screen advertisement as a page of content alongside other pages of content provided by your application, or you can display a full-screen advertisement modally when your application 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 application continues to run, but the user cannot see or interact with your application’s user interface. Instead, the user interacts with the rich media experience provided by the displayed advertisement. While an advertisement is displayed, your application’s activities should be scaled back, and features that require the user to see or hear your application’s user interface should be paused. Your application 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 Application
While the user interacts with an advertisement, your application continues to receive events. Once the user finishes the advertising action, control returns to your application. However, if your application receives an event that requires the user’s immediate attention, your application can programmatically cancel the advertisement to restore its user interface. Your application should only cancel advertising when it urgently needs the user’s attention. Frequently canceling advertisements can reduce the revenue generated by your application. It may also affect the inventory of advertisements that are offered to your application.
Validate Your iAd Support Before Releasing Your Application
When you build and run your application in Xcode, iAd automatically serves test advertisements to your application. You should confirm that your application 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 application into the background to launch another application. You should be familiar with the multitasking behavior introduced in iOS 4.0. See iOS App Programming Guide.
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 application should display advertisements, see iOS Human Interface Guidelines.
For details about the classes and protocols in the iAd framework, see iAd Framework Reference.