在 iOS 11 上使用 Xcode 8
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/44381860/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Use Xcode 8 with iOS 11
提问by Nazmul Hasan
I want to use Xcode 8 with iOS 11.
我想在 iOS 11 中使用 Xcode 8。
should I upgrade my Xcode. However, my code can't be built by the new compiler, so I want to stay with Xcode 8.
我应该升级我的Xcode吗?但是,我的代码无法由新编译器构建,所以我想继续使用 Xcode 8。
How can I achieve that?
我怎样才能做到这一点?
Apple revealed several new iOS 11 features at WWDC 2017.
Apple 在 WWDC 2017 上展示了几项新的 iOS 11 功能。
回答by yudun1989
As of now this is only for Debugging on iOS device, not Simulator
截至目前,这仅适用于在 iOS 设备上调试,不适用于模拟器
Xcode 8 could not support unless you have the DeviceSupport folder for the iOS 11 version.
Xcode 8 不支持,除非你有 iOS 11 版本的 DeviceSupport 文件夹。
You can download a Xcode 9 beta (latest Xcode 9) or get an DeviceSupport folder from other user.
Simply copy it to your folder or create an symbolic link
您可以下载 Xcode 9 beta(最新的 Xcode 9)或从其他用户那里获取 DeviceSupport 文件夹。
只需将其复制到您的文件夹或创建一个符号链接
sudo ln -s /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/11.0\ \(15A372\) /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/11.0
sudo ln -s /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/11.0\ \(15A372\) /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/11.0
reference: Use Xcode 7 with iOS 10
回答by Sour LeangChhean
Check this out: As of now this is only for Debugging on iOS device not Simulator
看看这个:截至目前,这仅用于在 iOS 设备上调试而不是模拟器
- Download the SDK from Apple
- Copy this iOS 11.0 imagefile to: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/
- Restart Xcode.
- 从 Apple下载 SDK
- 将此iOS 11.0 图像文件复制到:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/
- 重新启动Xcode。
回答by Daniel Bonates
I did this and it's fine, I still work both on comercial app using Xcode 8 + Swift 3 and exploring Xcode 9 beta with Swift 4. Just download the Xcode 9 and, inside Xcode 8 preferences, set the Command Line Tools to use the 9.0.
我这样做了,很好,我仍然使用 Xcode 8 + Swift 3 在商业应用程序上工作,并使用 Swift 4 探索 Xcode 9 beta。只需下载 Xcode 9,然后在 Xcode 8 首选项中,将命令行工具设置为使用 9.0 .
回答by ingconti
I preferred to copy ALL the folder:
我更喜欢复制所有文件夹:
/Volumes/**HighSierra**/Applications/Xcode-**beta.app**/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/11.0\ \(15A5278f\)
to:
到:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/**11**
I can confirm I can run on my iPhone 7 with iOS 11
我可以确认我可以在装有 iOS 11 的 iPhone 7 上运行