LilMoke
LilMoke

Reputation: 3444

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.

Upvotes: 0

Views: 2321

Answers (2)

Black Frog
Black Frog

Reputation: 11703

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.

Upvotes: 3

Related Questions