Does anyone know where I can get the iOS 4.2 SDK for xCode? I cannot find it anywhere on the Apple site.
I am building an App for Verizon Phones which only supports iOS 4.2. I get a runtime error that says 'Symbol not found' 开发者_运维知识库for AdInterstitialAd. I am not sure, but I am guessing I am getting that error because I added the iAd.framework from the iOS 4.3 SDK.
To submit an app to the App Store you will always build against the latest SDK which is 4.3. Apple will reject your app if you don't. You can set the deployment version of your app to lower version. And you are correct, AdInterstitialAd
is only available in 4.3 or higher. You can still use the ADBannerView
in the lower version.
If you want to use AdInterstitialAd
in your app, you will have to use weak linking to make sure the framework if avaiable.
For example:
class adClass = NSClassFromString(@"AdInterstitialAd");
If (adClass) {
// do full screen ad stuff
} else if ((adClass = NSClassFromString(@"ADBannerView")) {
// do banner ad stuff
}
Using iAds While Maintaining Backwards Compatibility is a blog that provide some tips for using iAds when it was first announced last year. Some of those tips are this valuable today.
http://www.felixbruns.de/iPod/firmware/
精彩评论