16

I upgraded Xcode to version 4.5. Now all of the preferences are reset back to factory settings - editor fonts, colors, etc - but this is not my biggest concern.

It seems the iOS SDK 5.1 I was targeting is now gone. In project's build settings I can only choose Base SDK between "Latest iOS (iOS 6.0)" and "iOS 6.0". Is it possible to recover the previous installed SDKs?

2
  • Is there a reason you need an older version of the SDK? If you are trying to support iOS 5.1 you can do that with the 6.x sdk, just set the deployment target to 5.1 Commented Jul 31, 2013 at 22:13
  • @LightningStryk that's exactly what the accepted answer states, thanks. Commented Aug 1, 2013 at 8:15

8 Answers 8

21

Download from this link, all sdks should be here. Some nice guy made it

http://uv.howett.net/~dhowett/sdks.php

Sign up to request clarification or add additional context in comments.

2 Comments

Nice job. but no iphone simulator 5.0 or above.
i managed to get the 5.0 simulator into xcode 5 by manually installing it through xcode 4.6, it then showed up for me in xcode 5
20

Current Xcode versions come only with the latest iOS SDK (which is a pity, but we cannot change it). Also Apple recommends to always use the latest SDK for building apps, and setting the "Deployment Target" to the minimum version that you plan to support.

You can copy an SDK (e.g. iPhoneOS5.1.sdk) from an older Xcode to

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs 

and it will appear in the build settings. But you might run into problems later with this configuration.

3 Comments

The developer portal now contains older versions of xcode for download.
+1 This still works with Xcode 4.6 under Mountain Lion. For the iPhone Simulator 5.0 SDK, I downloaded Xcode 4.2 For Lion from the Apple Dev Download site, and "Installed" it to my Lion disk slice. This created an /Volumes/Lion/Applications/Install Xcode.app. Drilling down inside that .app there is an installation package for the iOS 5.0 iPhone Simulator. I installed that into a temporary directory and then copied the iPhoneSimulator5.0.sdk into the Xcode 4.6 app bundle. Upon starting Xcode 4.6 it even installed an update to the iPhone Simulator 5.0 SDK!
Still works with Xcode 5 with iOS SDK 5.0 from Xcode 4.3. And I like to note we need to restart Xcode after copying the SDK.
5

In Xcode go to preferences-> downloads and download iOS 5 simulator as well as command line tools. Hope this helped

1 Comment

Downloading one of the older simulators is entirely different from downloading an older SDK version.
3

Yes!

When you click on the Simulator selection screen, at the bottom there's a More Simulators button.

enter image description here

However, be sure to set the Deployment Target to whatever Simulator you want to install. In your case, 5.1.

Then there will be another window which would show all the Simulators. Just install whichever you want! :)

1 Comment

More Simulators opens the Download Components prompt, which is what I try to avoid - I had 5.1 Simulator yesterday after all, now Xcode wants me to download it again. Thanks for the screenshot though.
3

I suppose you meant 'Base SDK' not target - as base SDK you should use latest one, I think there is no way to install 5.1 on Xcode 4.5 (but I can be wrong). You always can set 'Deployment Target' to 5.1 (minimal supported target is 4.3).

Anyway, since Xcode is wrapped inside app bundle, you're able to have two Xcode versions installed parallel if you need.

2 Comments

If you use 6.0 as the Base SDK, and you set the iOS Deployment Target to 5.1, will it "just work" on iOS 5.1 devices provided you didn't use any new features from iOS 6.0, or do the Xcode 4.5 project templates have things set up so the app wouldn't even physically run on an older device?
yes it will just work - you'll need only turn off autolayout in storyboards but xcode will tell you about that when you'll try to compile. you can even include iOS6.0 features (just link needed frameworks as 'optional') and use them on devices where they are supported (for example you can do something like that: if (NSClassFromString(@"SLComposeViewController") != nil) { /* do something with that controller, its iOS >= 6.0 device */ } else { /* iOS < 6.0, do legacy stuff */ })
3

In my other laptop that still had XCode 4.2, the location of the iOS 5 SDK was here: /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/ (as opposed to the location mentioned above)

so i just copied it over and voila!

Comments

2

1) First step: Download your simulator on this link http://uv.howett.net/~dhowett/sdks.php

2) Second step Unzip and add downloaded simulator in to path: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs

3) Restart Xcode. (in project settings set Deployment target 5.0 if needed)

Comments

0

You only need to install the SDK that you want using the Xcode -> Preferences -> Downloads screen:

Screenshot of the Downloads panel in Xcode -> Preferences

That will give you iOS5.1 simulator, iOS5.0 simulator, iOS4.3 simulator if you want them.

No trickery needed.

2 Comments

The questions was about installing older SDKs, not about installing simulators for older iOS versions.
installing lower simulator on sdk does not make sense

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.