简体   繁体   中英

iPhone Simulator 3.x not listed after upgrading to XCode 3.2.3 Beta4 with OS 4.0

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.

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.

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.

替代文字

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.

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 http://img.skitch.com/20100609-fk9aq46eyibf4ceftr6famdbt9.png

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.

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

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.

即使未列出3.x,您仍可以将其指定为iPhone OS部署目标下的目标。

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.

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!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM