5

I installed SDK 4.0 and found that I lost access to all previous SDK versions prior to 3.2.

I have found a link to download SDK 3.1.3 so I have both .dmg install files.

Questions:

Does SDK 4.0 not allow access to earlier version?

If the answer above is no then does that mean I have to have two versions of SDK installed?

If yes to the above....how?

Thanks in hope

user7865437
  • 812
  • 14
  • 28
  • possible duplicate of [SDKs disapearing when installing new versions of XCode with Iphone SDK ?!](http://stackoverflow.com/questions/3000241/sdks-disapearing-when-installing-new-versions-of-xcode-with-iphone-sdk) – zoul Jun 22 '10 at 11:01
  • You can use SDK4.0 and target earlier devices. This is covered in detail in a [previous question](http://stackoverflow.com/questions/3027120/how-to-make-iphone-app-for-multiple-firmwares/3027213#3027213). – progrmr Jun 23 '10 at 04:00

5 Answers5

7

The terminology is confusing but once you understand this it's easy.

The 'Base SDK' is just the version of the SDK that you are compiling against. So you can use any classes, properties, or methods in the Base SDK.

The Deployment Version is earliest version of the OS that you want users to be able to run your code against. If you use a feature available in the Base SDK version but not in the Deployment version then your code will launch on both versions but will crash on the earlier OS version when you use the new feature, so you need to check if the new feature is present if you want to do this.

So you don't need Base SDK of 3.0 to run on 3.0 - just set Base SDK to 4.0 and Deployment Version to 3.0 and don't use any features of the SDK that weren't present beyond 3.0.

user342492
  • 548
  • 3
  • 9
  • hi, yeah i understand that, probably asked the question wrong. My problem is I no longer see deployment versions below 3.2? – user7865437 Jun 23 '10 at 11:26
  • Ah ha! Got it but see why my confusion arises. "So you don't need Base SDK of 3.0 to run on 3.0 - just set Base SDK to 4.0 and Deployment Version to 3.0 and don't use any features of the SDK that weren't present beyond 3.0." You do this via the build configuration form which then allows you to select previous versions. The normal way I used to do this was from the toolbar Device option which used to display all previous versions whereas now with SDK 4 it does not. Well at least I have it working now :-) Thanks – user7865437 Jun 25 '10 at 10:38
  • 1
    Does this mean there is no way to tell before runtime that you've accidentally used a new API? – jamesh Jun 25 '10 at 11:13
0

The deployment target can be set to anything (even 2.2), but the Base SDK has nothing except 3.2 and 4.0. I would have thought if you set the deployment target to 3.0 for example, that the Base SDK could also be set to 3.0.

So if the deployment SDK is 3.0, and the base SDK is 4.0, which one is being compiled for?
Note in the new SDK, you can't select anything other than 3.2 and 4.0 as mentioned above.

Chris
  • 21
  • 2
  • Please can anyone help? It seems silly to have to have two versions of XCode installed and compile the same app in each to make to work on earlier versions? Just to confirm, I installed the SDK 4.0 and in doing so I now only have targets of 3.2 and 4.0? If I want to build to anything lower I have to close XCode and open up the earlier version that gives me access to those targets below 3.2. Oddly in the Developer folder for 4.0 it lists all the SDKs of earlier targets but will not let me access them from within XCode. HELP! please..... Thanks – user7865437 Jun 25 '10 at 07:51
  • Chris, http://developer.apple.com/mac/library/documentation/DeveloperTools/Conceptual/cross_development/Configuring/configuring.html has a good explanation of how the deployment target and base SDK settings work, and how your compiled app will resolve symbols. – Christopher Pickslay Jul 01 '10 at 23:33
0

Looks like a problem with apple. I am also getting: "Base SDK Missing" after installing Snow Leopard and the iPhone SDK 4. There is no Base SDK in my case. I'm a newbie to the system and meant to make this a comment, not an Answer.

UPDATE: After reading the readme that comes with the SDK 4 a little closer, I see that it (xCode 3.2.3 and it's iPhone SDK4) does not support iPhone prior to 3.2 - the solution is to install the older SDK in a different directory. Also, don't forget to update your device if you use the newer xCode/SDK.
ANOTHER UPDATE:
Please ignore this ANSWER and see the one above that was provided by aizuchi. Don't forget to read the part about Base SDK area being a different thing from Deployment.

MCroswell
  • 11
  • 2
  • 1
    This is incorrect. There is no reason to have more than one copy of XCode installed even if you want to support older versions of the OS. – user342492 Jun 26 '10 at 23:08
  • I believe your are right. It took me a long time to finally understand what you said about "iPhone OS Deployment Target" and it being the place to get the support for older versions of the OS. The Base SDK just gets things rolling after it gets set to 3.2 or 4.0 - THEN you do the Deployment field a few screens below. Anyway, thanks so much for your Answer(s)! – MCroswell Jun 27 '10 at 06:24
0

As I understand it, using any SDKs other than 3.2 and 4.0 is now deprecated for app store submissions. Therefore, logically, those other SDKs are no longer options in xCode (3.2.3) either. IMO, trying to get around this is futile. I've written a community wiki that explains it more fully here.

Community
  • 1
  • 1
Clay Bridges
  • 11,602
  • 10
  • 68
  • 118
  • Why would you want to "get around it" anyway? You can set the deployment target and it's as if nothing changed. – typeoneerror Jul 06 '10 at 08:02
  • False on many levels. First, I think you are misunderstanding deployment target. AFAIK, it's just a flag for the app store, and you still have access to the full API of the "Base SDK", no warnings. You are responsible for only conditionally using APIs that are above your deployment target. E.g my deployment target is 3.0, yet I can instantiate a UIGestureRecognizer (3.2+). In the field that will throw an error. Moreover, some people might want to "get around it" in, e.g., the sense of running an older simulator, something you've been able to do through every xCode upgrade up to now. – Clay Bridges Jul 06 '10 at 15:43
0

You need to set the Base SDK to the latest version and set the iPhone Deployment Target to 3.0 for example.

It's recommend to test your application for earlier versions.

Fabio Poloni
  • 8,219
  • 5
  • 44
  • 74