iOS 5 SDK in Xcode 4.5

Member
Posts: 241
Joined: 2008.07
Post: #1
My computer is totally up to date with 10.8.2 and the most current version of Xcode.

I need to be able to support pre-iOS 6.0, but the only SDK that appears to be available as a target is iOS 6.

I read somewhere that if you change the Architecture to armv7 (not armv7s), that the option in the Base SDK for iOS 5 would appear. It was said that this should be in the target setting. However, I'm having problems:

• The only option in the target settings for Architecture is "Build Active Architecture Only (No)".
• Setting the Architecture to "armv7" in the project setting does not have any affect on the list of available iOS SDK's I can target.

I have downloaded the installation for Xcode 4.4.1, which should have the iOS 5 SDK in it, but I'm not sure what's going to happen when I try to install it with 4.5 already installed. What I really need is to be able to use Xcode 4.5 and be able to deploy an app to 5 OR 6.

Many thanks in advance.
Quote this message in a reply
Member
Posts: 446
Joined: 2002.09
Post: #2
You should always use the latest SDK, and set your deployment target to lowest OS you want to support. In Xcode 4.5 the lowest deployment target is iOS 4.3 (the first version that ditched armv6 support).

But, all devices that can run 4.3 can also run 5.1.x so personally I've set my deployment target to 5.1. Plus I don't actually have a device with 4.3 to test on, so there's no way I'm building blind.

If you need to build for armv6 then your only choice is to install an older Xcode. I've read that Xcode 4.3.3 is best for this as the 4.4 series may have broke in certain annoying ways as Apple began stripping armv6 support in preparation for Xcode 4.5.

AFAIK it's still possible to install 2 Xcodes on one machine but I haven't tried it in a while, and I don't think the old iOS simulators work on Mountain Lion.
Quote this message in a reply
Member
Posts: 241
Joined: 2008.07
Post: #3
I ended up having to install 4.4.1 and it solved my dilemma temporarily. I'll still need to be able to deploy to 5.x using 4.5 if it's possible as you say it is.

So you say it's possible, but I still don't see any other option besides iOS 6 in my list of SDK's.
Quote this message in a reply
Member
Posts: 446
Joined: 2002.09
Post: #4
Like I said - you need to change the deployment target not the SDK. You can change the deployment target in the project info, target summaries, or build settings.

Note that using a deployment target lower than the SDK version does mean that you have to be more careful with API usage. iOS SDK 6 features might not work on iOS 5, so you need to be aware of compatibility issues and do runtime checks/fork your code as needed.
Quote this message in a reply
Post Reply