Xcode 5有一个首选项窗格,允许一个人下载iPhone 6.1模拟器,但我找不到一个地方,它允许下载iOS 6 SDK,因此不可能将活动SDK设置为iOS 6时,用Xcode 5开发。是否存在允许Xcode 5安装iOS 6 SDK的解决方案?
编辑:
既然Xcode 5已经普遍可用,并且允许你下载以前版本的SDK,那么变通方法应该不再是必要的了。
Xcode 5有一个首选项窗格,允许一个人下载iPhone 6.1模拟器,但我找不到一个地方,它允许下载iOS 6 SDK,因此不可能将活动SDK设置为iOS 6时,用Xcode 5开发。是否存在允许Xcode 5安装iOS 6 SDK的解决方案?
编辑:
既然Xcode 5已经普遍可用,并且允许你下载以前版本的SDK,那么变通方法应该不再是必要的了。
当前回答
对我来说最简单的解决方法:
Locate an older SDK like for example "iPhoneOS6.1 sdk" in an older version of xcode for example. If you haven't, you can downlad it from Apple Developer server at this address: https://developer.apple.com/downloads/index.action?name=Xcode When you open the xcode.dmg you can find it by opening the Xcode.app (right click and "show contents") and go to Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1 sdk Simple Copy the folder iPhoneOS6.X sdk and paste it in your xcode.app right click on your xcode.app in Applications folder. Go to Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/ Just paste here.
关闭你的xcode应用程序,重新打开它。
要在模拟器上测试iOS 6中的应用程序: -在你的活动场景中选择iOS 6.0即可。
要在iOS 6中构建应用程序,那么你的应用程序的设计将是iOS 7 iPhone上的旧设计: —在“Targets - Base SDK”中选择“iOS6.1”
请注意:当你在你的目标中改变基础SDK时,iOS 7.0将不再可用来构建模拟器!
其他回答
您可以下载旧的SDK并将其安装进去
xcode /内容/开发/平台/ iPhoneOS.platform /开发/ sdk /
文件夹中。注销+登录只是为了确保更改生效,你应该在你的新XCode中看到旧的SDK
Download Xcode 4.6.x from the Apple Dev Center: https://developer.apple.com/downloads/index.action Create a folder called Xcode4 within the Applications folder and drag-n-drop the downloaded dmg there. Open a terminal window $sudo cp -R /Applications/Xcode4/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/ You will be prompt to enter a password since you're inside a system folder Open Xcode 5 and you should now see both SDKs
对我来说最简单的解决方法:
Locate an older SDK like for example "iPhoneOS6.1 sdk" in an older version of xcode for example. If you haven't, you can downlad it from Apple Developer server at this address: https://developer.apple.com/downloads/index.action?name=Xcode When you open the xcode.dmg you can find it by opening the Xcode.app (right click and "show contents") and go to Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1 sdk Simple Copy the folder iPhoneOS6.X sdk and paste it in your xcode.app right click on your xcode.app in Applications folder. Go to Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/ Just paste here.
关闭你的xcode应用程序,重新打开它。
要在模拟器上测试iOS 6中的应用程序: -在你的活动场景中选择iOS 6.0即可。
要在iOS 6中构建应用程序,那么你的应用程序的设计将是iOS 7 iPhone上的旧设计: —在“Targets - Base SDK”中选择“iOS6.1”
请注意:当你在你的目标中改变基础SDK时,iOS 7.0将不再可用来构建模拟器!
这里的其他答案也是正确的,但我发现以下步骤是最简单的:
只需从开发中心链接下载Xcode 4.6.3,上面写着“寻找Xcode的旧版本?”(目前点这里)和安装dmg。
然后在终端,复制SDK文件:
cp -R /Volumes/Xcode/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/
最后,重新启动Xcode,你就完成了。
编辑:从2014年2月1日开始,苹果将不再接受ios 7之前的应用程序提交到App Store。因此,虽然这个技巧仍然有效,但对大多数读者来说并不有用。
是的,这很好。我仍然在一个项目中使用iOS 4.3(自从我们更新以来已经有一段时间了;但在iOS 6发布后,他们仍然接受了它),我目前用Xcode 5开发了10.5个应用程序。
参见如何将Xcode指向旧SDK,以便它可以用作“基础SDK”?有关如何设置它的详细信息。你可以使用我的fix-xcode 脚本链接一切为您每次升级。
唯一的诀窍就是拿到旧的sdk。如果你没有它们,你通常需要下载旧版本的Xcode(仍然可以在developer.apple.com上找到),打开安装包,然后四处寻找你需要的SDK。
sdk可以在安装包中找到:
xcode /内容/开发/平台/