Well, I haven't done that yet in my iPad apps, but here's how I would do it.
- First of all, I would mark the iAd framework as a weak/optional link. This would be the first step for compatibility with pre-iOS4. If you don't do that, the app may not even startup
- Secondly, I wouldn't add it in the nib file (if using one). I would rather add it programmatically to be ale to check if the iAd framework is available on device.
- Finally check if iAd is present. If it is, setup the ad, but if it isn't, just continue, or setup admob instead or something.
How to check that iAd is present? One of the simple ways is doing something like this
if(NSClassFromString(@"ADBannerView") != nil) {
//iAd is present
}
Hope this helps