【问题标题】:Is it possible to run iOS 11 Simulators on Xcode 8?是否可以在 Xcode 8 上运行 iOS 11 模拟器?
【发布时间】:2018-03-27 08:51:08
【问题描述】:

在 Xcode 9 带来的所有问题之后,我想避免升级到它,直到社区知道它是稳定的。但是,我需要在 Xcode 8 上运行 iOS 11 模拟器,但我想不出办法。

我找到了如何在 Xcode 8 中支持 iOS 11 设备,但我还需要运行 iOS 11 模拟器。

这可能吗?如果是这样,请指导我如何执行此操作。

【问题讨论】:

  • 我不会推荐它。例如,Xcode 8 有旧框架。 Xcode 9 有新的框架。如果某些框架代码在 Xcode 9 中被弃用怎么办?如果你想要 Xcode 8,那么不要更新 Xcode 8,而是从网站下载 Xcode 9,并排使用它。

标签: iphone macos ios-simulator xcode8 ios11


【解决方案1】:

不支持,但您可以通过将 iOS 11 simruntime 包复制到 ~/Library/Developer/CoreSimulator/Profiles/Runtimes 然后将 iOS 10 中的 platform_launch_helper 添加到 iOS 11 中来完成此操作(它已被删除,但 Xcode 8 需要它)。

假设您的 Xcode 9 位于 /Applications/Xcode-9.app 并且 Xcode 8 位于 /Applications/Xcode-8.app,您可以通过以下方式完成此操作:

mkdir -p ~/Library/Developer/CoreSimulator/Profiles/Runtimes
cp -a /Applications/Xcode-9.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime ~/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS11.0.simruntime
ln -s /Applications/Xcode-8.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/libexec/platform_launch_helper ~/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/libexec/platform_launch_helper

注意:主包的符号链接不起作用。你需要复制它。如果您使用符号链接,CoreSimulatorBridge 作业将不会加载,您将无法安装应用程序。

如果您将来更新 Xcode 9,您应该重做此操作以确保您的本地副本中有最新的更新。

【讨论】:

    猜你喜欢
    • 2011-05-27
    • 2011-12-19
    • 2015-03-16
    • 2021-09-21
    • 2021-08-24
    • 1970-01-01
    • 1970-01-01
    • 2019-11-13
    相关资源
    最近更新 更多