简体   繁体   中英

iOS 4.2 SDK download

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM