Changes

Integrating iAds into an iOS 4 iPad App (Xcode 4)

5 bytes removed, 17:48, 22 April 2011
no edit summary
The complexities of choosing the right balance of revenue streams aside the implementation of iAds advertising in an iPad application is actually a very straightforward process.
== iOS iPhone iPad Advertising Options ==
In the early days of the iOS application market, the dominant advertising network was provided by a company called AdMob. AdMob provided an SDK that enabled developers to incorporate AdMob sourced adverts into their iOS applications. In the early days AdMob came under some criticism for the quality of the ads that were served (which mostly took the form of ads for other iPhone applications). Eyeing AdMob’s dominance with envy and concern, both Apple and Google began negotiations to purchase the mobile advertising company. After lengthy discussions, very few details of which were ever made public, AdMob was acquired by Google.
Given these requirements and possibilities it is important that the application code keep track of when an ad is displayed and the events that may unfold as a result of a user interacting with that ad. Fortunately this can easily be achieved by implementing a number of delegate methods defined in the ADBannerViewDelegate protocol as outlined later in this chapter.
== Creating an Example iAds iPhone iPad Application ==
In the remainder of this chapter we will work step by step through the creation of a simple iOS iPad application that includes an iAd banner view advertisement capable of displaying in both portrait and landscape orientation.
In the above code we have also added a line that reads <ADBannerViewDelegate>. This indicates to the compiler that within the view controller we will be implementing the delegate methods for the banner view protocol.
== Designing the User Interface ===
The next step is to design the user interface and connect the table view object to the tableView outlet declared in the view controller interface file above. Select the ''iAdAppViewController.xib'' file, display the Object library (''View -> Utilities -> Object Library'') and drag and drop a UITableView object into the View window as illustrated in the following figure: