views:

6815

answers:

11

I've been having some problems, & since you guys are the smartest devs I thought I'd just ask you.

When I last installed Xcode 3.2.3 Beta 2 (OS 4.0 support), it had all the iPhone Device & Simulator 3.x.

Now, updated to Xcode 3.2.3 Beta 4 (OS 4.0 support), it no longer lists 3.x SDKs for either simulator or device in XCode. When I run an app that was written for 3.1.2, the current SDK is listed as "base SDK missing"

I'm aware that 3.2.3 changes the BASE SDK to 4.0, but how come none of the 3.x devices are available either?

When I go to:

/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs

The only two files available are:

iPhoneSimulator3.2.sdk
iPhoneSimulator4.0.sdk

However, when I go to:

/Developer/Platforms/iPhoneOS.platform/DeviceSupport

3.0
3.0.1
3.1
3.1.1
3.1.2
3.1.3
3.2
4.0 (8A274b)

I've tried re-installing the most recent XCode DMG to no avail. Thanks in advance!

+6  A: 

It seems like they removed them.

If you are developing for the older OS, you should not be using the 4.0 Beta SDK.

According to the release notes:

iPhone OS 4 beta 4 is for development purposes only. This software should only be installed on devices dedicated exclusively for iPhone OS 4 beta application development. Do not install this software if you do not have a device dedicated exclusively to iPhone OS 4 beta application development.

I would recommend you install the 3.x sdk in parallel to the 4.0. I keep the two Developer directories on my machine /Developer for maintaining apps written for 3.0 and 3.1, and /Developer4.0Beta for migrating apps to 4.0, and trying out the new features that will be available soon.

The option to install to another folder is a bit hard to notice when installing the sdk, but the trick is to hit the up/down arrows by the default directory on the 'Installation Type' step. After hitting them it will allow you to choose a different directory.

alt text

Remember, that App;le won't allow you to submit an App built with a Beta SDK, so I would only use the 4.0 Beta for building 4.0 Apps, keeping in mind that the APIs might still change before the GM is released.

Brad Smith
Thanks Brad.How do you run the two in parallel? When I install 3.2 again, it removes the 4.0 features. And when I install 4.0, it doesn't give me the option to customize the directory. Do I just install 4.0 first, then rename the Developer folder?Thanks1
Jon
@Jon, I edited the answer to show where to change the default directory. It is a bit non-obvious, and I didn't know it existed the first several times I installed various versions of the SDK
Brad Smith
@Jon, also renaming the folder should work as well. That's what I did before I found those little arrows
Brad Smith
Wow thanks Brad! I'm a power user and didn't even notice this! (then again, i'm guessing most devs are power users, haha)Just to confirm: there is no way of running the newer XCode 3.2.3 Beta4 with the older os 3.1.x SDKs? You have to chose one or the other?
Jon
@jon i tried to manually load(Drag n' Drop) the SDK files from 3.1/3.2 SDK into the 4.0 xcode dev folders, didn't work, i assume with some plist hacking you could get it to work.
Jonathan
This is still broken in the GM seed Xcode 3.2.3.
Dan Fabulich
The final release is out now and still the iPhone SDK 3.1 and earlier are missing - I suggest you don't upgrade if you still use and older device version to develop (debug/test).
adib
+6  A: 

Yeah, I was just banging my head against this one for a while too. It turns out you need to modify your project settings (right-click project > "Get Info") here:

XCode project settings

It will probably say "3.1 (missing)" since they removed that from XCode 3.2.3. Change it to 3.2 or 4.0 and you should be up & running again.

Matt Good
What if **iPhone OS Deployment Target** is *missing* under Deployment? (I'm looking at All Settings for All Configurations, just to be sure.)One of my projects has it and the other doesn’t, yet both were originally created with Xcode 3.1.x. How odd. (I'm now on Xcode 3.2.3, using 4.0 as the **Base SDK**, but one of the projects seems to have lost the tie-in to "iphoneos3.0" as a deployment target.)
Joe D'Andrea
In my experience, it's not part of the *project* settings. Instead, you have to select the *target*, and then you will see it.
Clay Bridges
+7  A: 

You should read: http://www.clarkcox.com/blog/2009/06/23/sdks-and-deployment-targets/ This explains very nicely the difference between the Base SDK and Deployment Target -- in short, the Base SDK is the highest SDK version you expect to support, whereas the Deployment Target is the lowest version you will support. You need to make sure both are properly selected, and that your code will support the functionality from those SDKs properly.

pixel
A: 

Even though 3.x is not listed you can still specify it as a target under iPhone OS Deployment Target.

nicktmro
+1  A: 

Changing the iPhone OS Deployment Target fixes this issue, just as nicktmro mentioned above.

I am running the new os4.0 on my iphone and the new 4.0sdk. I had to set my BAse SDK as 4.0, but then in the "Get Info> Build" then scroll down to Deployment section. Last option should say iPhone OS Deployment Target.

You can choose all the way back to os 1.0

whatiwant
A: 

The only Deployment Target I see in my iPhone project is "Mac OS X Deployment Target", and that's not what I want. How do I get the one you guys are talking about to appear?

A: 

I have the same as henning. If I create a new project, then it shows iPhone Deployment Target but not against the new project.

14o
ok I was just blind. If you look 7 lines below, I can find iPhone Deployment Target. Duh.
14o
A: 

To display the iPhone OS Deployment Target right click on the project and go to Get Info. There is a "Show" drop down, select "All Settings", at the bottom of the Deployment section is the iPhone Deployment Target.

kevin rahilly
A: 

If iPhone OS Deployment Target is completely missing under Deployment, and you're looking at All Settings for All Configurations, you may need to brute force things.

In my case, I closed the project in Xcode, then opened the project's (working) xcodeproj bundle. For those not in the know, just right-click the xcodeproj "file" and pick Show Package Contents (xcodeproj is actually a directory). After backing up project.pbxproj for safety, look under the buildSettings of every XCBuildConfiguration and make sure these two lines appear:

IPHONEOS_DEPLOYMENT_TARGET = 3.0;
SDKROOT = iphoneos4.0;

This will target the Base SDK as iOS 4.0 (Device, NOT Simulator), but set the Deployment target to a minimum of iOS 3.0. It even shows up properly in Xcode once you re-open the project. Problem solved!

Joe D'Andrea
A: 

This is for those of us who are only seeing the MacOSX deployment target when we change the Base SDK version at the project level. I found that if I only set the Base SDK to iPhone OS 4.0 at the project level, I didnt' get the iPhone OS Deployment Target option. If I set the BaseSDK and iPhone OS Deployment Target at the target level (which showed up immediately after changing the SDK), I could then go back to the project and see the iPhone OS Deployment Target setting.

It may be worth trying before going the brute force route.

Regards.

mikeq
A: 

MikeQ,

That works! Thanks!

doug

Doug