tags:

views:

42

answers:

2

Im trying to get my xCode to contain all iPhone sdk's from 4 back to 2. But when I download the DMG files, it seems to only allow me to have an xCode with SDK versions 2 - 3.1 OR 3.2 - 4, not all together.

How can I install the SDK's into one xCode so I can build for all different OS versions?

Thanks

EDIT::

Ok so I know I can set the base SDK in xcode, but the options I have are only 3.2 or 4.0, I cant seem to install the 3.1 or earlier SDK's how can this be done?

Final Edit::

Ok got it solved, basically you only need to have an older version of xcode installed to get earlier simulators running, otherwise the articles given to me in my answers as well as others were very helpful:

http://www.clarkcox.com/blog/2009/06/23/sdks-and-deployment-targets/

http://stackoverflow.com/questions/3161385

http://stackoverflow.com/questions/3027120

http://cocoawithlove.com/2010/07/tips-tricks-for-conditional-ios3-ios32.html (possibly the best one)

A: 

I tried the same thing some time ago, and it seems some minor SDK versions are automatically removed during the install process...

You may tried to copy them before installing the other XCode versions, and re-install them just after.
They are located in /Library/Platforms/iPhoneOS.platform/Developer/SDKs/ and /Library/Platforms/iPhoneSimulator.platform/Developer/SDKs/.

Note that you can also choose to install each XCode version in a separate directory.
You will lose a lot of hard disk space, and you'll have multiple versions of XCode, each one with different SDK versions.

Macmade
Thanks, can you please elaborate on what to do with the SDK directories? You are right, the older SDK's seem to have been uninstalled, which is stupid...
Mark
+1  A: 

Is there any particular reason you need to do this? Are you trying to develop applications that will run on iOS 4.x and older versions (3.x)? You can still develop applications which will run on iOS 3.1.x with the iOS 4.x sdk.

Take a look at the following article: http://www.clarkcox.com/blog/2009/06/23/sdks-and-deployment-targets/

JonB
wow, i did not know that, thanks jonb!
Mark
Thanks jonb, but I cant seem to set the base SDK to earlier than 3.2, the only options in the drop down are 3.2 and 4.0, how can I get the earlier SDK's installed?
Mark
From the article: "All I need to do to accomplish this is to set my Base SDK to “OS 4.0”, which will allow my application to use the new feature, and set my deployment target to “3.0″, which will allow my application to launch on OS 3.0.". You will then need to week link your frameworks.
JonB
ok, so I guess the only reason to have previous versions of xcode installed is to get older simulators...
Mark
Yes, pretty much. I prefer testing on device once I get to that kind of stage. Horses for courses.
JonB