iOS 5 SDK is gone after upgrade to Xcode 4.5

2020-01-30 11:13发布

I upgraded Xcode to version 4.5. Now all of the preferences are reset back to factory settings - editor fonts, colors, etc - but this is not my biggest concern.

It seems the iOS SDK 5.1 I was targeting is now gone. In project's build settings I can only choose Base SDK between "Latest iOS (iOS 6.0)" and "iOS 6.0". Is it possible to recover the previous installed SDKs?

8条回答
淡お忘
2楼-- · 2020-01-30 11:51

In my other laptop that still had XCode 4.2, the location of the iOS 5 SDK was here: /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/ (as opposed to the location mentioned above)

so i just copied it over and voila!

查看更多
小情绪 Triste *
3楼-- · 2020-01-30 11:52

I suppose you meant 'Base SDK' not target - as base SDK you should use latest one, I think there is no way to install 5.1 on Xcode 4.5 (but I can be wrong). You always can set 'Deployment Target' to 5.1 (minimal supported target is 4.3).

Anyway, since Xcode is wrapped inside app bundle, you're able to have two Xcode versions installed parallel if you need.

查看更多
唯我独甜
4楼-- · 2020-01-30 11:56

In Xcode go to preferences-> downloads and download iOS 5 simulator as well as command line tools. Hope this helped

查看更多
放荡不羁爱自由
5楼-- · 2020-01-30 12:06

Download from this link, all sdks should be here. Some nice guy made it

http://uv.howett.net/~dhowett/sdks.php

查看更多
你好瞎i
6楼-- · 2020-01-30 12:06

You only need to install the SDK that you want using the Xcode -> Preferences -> Downloads screen:

Screenshot of the Downloads panel in Xcode -> Preferences

That will give you iOS5.1 simulator, iOS5.0 simulator, iOS4.3 simulator if you want them.

No trickery needed.

查看更多
forever°为你锁心
7楼-- · 2020-01-30 12:09

Yes!

When you click on the Simulator selection screen, at the bottom there's a More Simulators button.

enter image description here

However, be sure to set the Deployment Target to whatever Simulator you want to install. In your case, 5.1.

Then there will be another window which would show all the Simulators. Just install whichever you want! :)

查看更多
登录 后发表回答