如何在 Xcode 7.0 beta 2 中运行 iOS 7.1 模拟器?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/31056634/
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
How can I run the iOS 7.1 Simulator in Xcode 7.0 beta 2?
提问by IOS Rocks
I have installed latest Xcode 7 beta 2 version, when I am trying to run the application in iOS 7.1 Simulator its giving this error message:
我已经安装了最新的 Xcode 7 beta 2 版本,当我尝试在 iOS 7.1 Simulator 中运行该应用程序时,它给出了以下错误消息:
The iOS 7.1 simulator runtime is not available.
Unable to open liblaunch_sim.dylib. Try reinstalling Xcode or the simulator runtime.
iOS 7.1 模拟器运行时不可用。
无法打开 liblaunch_sim.dylib。尝试重新安装 Xcode 或模拟器运行时。
Could you please let me know how to resolve this error?
你能告诉我如何解决这个错误吗?
采纳答案by Karlo A. López
You can't (At least in an Official way).
你不能(至少以官方的方式)。
Taken from Xcode Beta 2 Documentation(Page 7).
取自Xcode Beta 2 文档(第 7 页)。
Hope it helps.
希望能帮助到你。
EDIT SEPT - 2015:
编辑 9 月 - 2015 年:
Thanks C?ur for the info, now you can use previous versions of ios simulator.
感谢 C?ur 提供的信息,现在您可以使用以前版本的 ios 模拟器。
回答by Anthony De Smet
Took a lot of browsing but I finally found a solution that worked for me (tried Gend's answer but didn't work). Execute the following lines:
进行了大量浏览,但我终于找到了一个对我有用的解决方案(尝试了 Gend 的答案但没有用)。执行以下几行:
sudo mv "/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 7.1.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/host/liblaunch_sim.dylib"{,.bak}
sudo ln -sf "/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib/system/host/liblaunch_sim.dylib" "/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 7.1.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/host/liblaunch_sim.dylib"
Source: https://gist.github.com/leecade/83b4e710d7c741152527
回答by Gend
First, find the target file:
首先,找到目标文件:
/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib/system/host/liblaunch_sim.dylib
You need make backup liblaunch_sim.dylib (Just in case). Second, copied to destination (Remember to backup)
您需要备份 liblaunch_sim.dylib(以防万一)。二、复制到目的地(记得备份)
/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 7.1.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/host/liblaunch_sim.dylib
And If need it to: iOS 8.1.simruntime iOS 8.2.simruntime iOS 8.3.simruntime All done.
如果需要它: iOS 8.1.simruntime iOS 8.2.simruntime iOS 8.3.simruntime 全部完成。
Hope it helps.
希望能帮助到你。
回答by Hasya
When you are using sudo command and terminal says: "Command not found" Then use command like below.
当您使用 sudo 命令并且终端说:“找不到命令”然后使用如下命令。
sudo su (enter)
sudo su(输入)
$ sudo mv "/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 8.1.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/host/liblaunch_sim.dylib"{,.bak}(enter)
$ sudo mv "/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 8.1.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/host/liblaunch_sim.dylib"{,.bak}(回车)
$ sudo mv "/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 7.1.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/host/liblaunch_sim.dylib"{,.bak}(enter)
$ sudo mv "/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 7.1.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/host/liblaunch_sim.dylib"{,.bak}(回车)
$ sudo ln -sf "/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib/system/host/liblaunch_sim.dylib" "/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 8.1.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/host/liblaunch_sim.dylib"(enter)
$ sudo ln -sf "/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib/system/host/liblaunch_sim.dylib" "/Library/Developer /CoreSimulator/Profiles/Runtimes/iOS 8.1.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/host/liblaunch_sim.dylib”(输入)
$ sudo ln -sf "/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib/system/host/liblaunch_sim.dylib" "/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 7.1.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/host/liblaunch_sim.dylib"(enter) Exit(enter)
$ sudo ln -sf "/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib/system/host/liblaunch_sim.dylib" "/Library/Developer /CoreSimulator/Profiles/Runtimes/iOS 7.1.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/host/liblaunch_sim.dylib"(enter) Exit(enter)
Now relaunch Xcode 7 if open earlier.you will be able to run simulators.
如果较早打开,现在重新启动 Xcode 7。您将能够运行模拟器。
回答by concertman
In Xcode 7 beta 6 this seems to be possible now.
在 Xcode 7 beta 6 中,这现在似乎是可能的。
http://adcdownload.apple.com/Developer_Tools/Xcode_7_beta_6/Xcode_7_beta_6_Release_Notes.pdf
http://adcdownload.apple.com/Developer_Tools/Xcode_7_beta_6/Xcode_7_beta_6_Release_Notes.pdf
Xcode 7.0 beta now supports downloadable legacy simulators. (20699475)
Xcode 7.0 beta 现在支持可下载的旧版模拟器。(20699475)
I haven't found a place to download these yet though. I will update when/if I find them.
我还没有找到下载这些的地方。我会在/如果我找到它们时更新。