`

HowTo: Install iPhone SDK 2.0 – 3.1 for XCode 3.2[转]

 
阅读更多

原文链接

 

So… you’ve installed the latest SDK and XCode from Apple’s developer site only to find out that the only base SDK’s you are left to develop with are 3.2 and 4.0. What about if you have an iPhone 2G as your only development device? The iPhone 2G only goes up to iOS 3.1.3 and if you are stuck with the lowest base SDK of 3.2, you will not be able to push your apps to your iPhone.

This is exactly what happened to me. I downloaded the beta SDK for the 4.0 iOS when it came out. Little did I know that when you install that, it removes all SDK’s prior to 3.2.

Luckily for us, Apple is kind enough to keep previous versions of Xcode and their SDK’s available for download. Here is a list of available downloads.

You have to be logged into the Apple developer site http://developer.apple.com to download the above listed SDK’s. I downloaded the 3.1.3 Snow Leopard SDK since I already have 3.2 and 4.0 and 3.1.3 includes all of the above mentioned SDK’s as well as 2.0 and 2.1.

Once you’ve downloaded the SDK of your choice it should be in the form of a DMG, go ahead and mount that and open up the resulting volume. You should get something that looks like the image below.

iPhone SDK Volume

iPhone SDK Volume

At this point you will need to open up the Packages folder rather then running the installer because all we want are the SDK’s. When you open up the Packages folder scroll down a bit until you see the SDK’s. You should see something similar to the screen shot below.

Packages Folder

Packages Folder

You’ll see that there are device SDK’s and simulator SDK’s. You don’t have to install the simulator SDK’s if you don’t want to because all we are really after here is to be able to push our apps to an iPhone with an iOS earlier then 3.2. Double click on one of the iPhone SDK’s and you will be presented with an installer screen like the one below.

iPhone SDK Installer Screen

iPhone SDK Installer Screen

Click on Continue and and you will get to the next screen similar to the one in the screen shot below

iPhone SDK Installer Screen

iPhone SDK Installer Screen

On this screen you need to click on the drive you want to install the SDK to. In most cases it will be your primary Hard Drive. If you have your Developer tools installed on a different drive then you should select that one instead. Next you need to click on Choose Folder and you will be presented with a Choose Folder dialog similar to the screen shot below.

Choose Folder Dialog

Choose Folder Dialog

If you are like me and installed Xcode in the default location then you should have a developer folder in the root of your Hard Drive. Click on the Developer folder and then click choose. You will see a screen similar to the one below.

iPhone SDK Installer Screen

iPhone SDK Installer Screen

You can verify on this screen that you’ve selected the proper folder. It should have a blue circle around the Hard Drive and if you’ve picked the Developer folder it should say the following on the bottom “You have chosen to install this software in the folder Developer on the disk Macintosh HD. Click Continue and you will be presented with a screen similar to the below screen shot.

iPhone SDK Installer Screen

iPhone SDK Installer Screen

This is just a confirmation screen, from here you just need to click on Install. You may be prompted with a password screen. Enter your password to continue with the installation. You should see a screen similar to the one below.

iPhone SDK Installer Progress Screen

iPhone SDK Installer Progress Screen

Depending on the SDK you are installing this part can take up to 5 minutes to complete. When the installation is done you will be presented with a screen similar to the one below.

iPhone SDK Install Complete

iPhone SDK Install Complete

Click on close. At this time your installation of the SDK is complete. You can verify that the SDK installed successfully by launching Xcode. Once Xcode is launched open an existing project or start a new one and go to Project -> Project Settings. You should see a screen similar to the below screen shot.

Xcode Project Settings - General

Xcode Project Settings - General

Click on the drop down towards the bottom where you can choose your base SDK and if all went well you should see a screen similar to the below depending on which SDK you installed.

iPhone SDK's

iPhone SDK's

Pick your SDK of choice and enjoy. Hopefully this tutorial has helped someone with their project. I spent many hours the other night researching how I could install older version SDK’s and once I found an easy method I thought I would share it with the rest of the world. If for some reason you don’t see your SDK listed here then it may have been installed in the wrong folder. If you can’t get it working feel free to ask me for help. I’m always willing to help out a fellow developer.

Similar Posts:

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics