是否可以在未安装 Xcode 的情况下在 Mac 上运行 iOS 模拟器?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4475148/
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
Is it possible to run iOS simulator on a Mac without Xcode installed?
提问by Rhodes
There are a few questions relating to this topic but nothing quite the same when it comes down to the details:
有一些与此主题相关的问题,但在细节方面没有完全相同的问题:
We would like to use the iOS Simulator without installing the rest of XCode on a macbook. It is an in-house laptop, and will be used by employees, but not engineers.
我们想使用 iOS 模拟器而不在 macbook 上安装其余的 XCode。这是一台内部笔记本电脑,供员工使用,但不供工程师使用。
We already know how to run applications on the simulator without the source code and compiling required, but it would be nice to be able to install a 100MB app and application support that can run our in-house distribution app as opposed to a 2.4GB XCode installation. Any ideas? Thanks.
我们已经知道如何在不需要源代码和编译的情况下在模拟器上运行应用程序,但是能够安装一个 100MB 的应用程序和应用程序支持来运行我们的内部分发应用程序而不是 2.4GB 的 XCode 会很好安装。有任何想法吗?谢谢。
采纳答案by hotpaw2
The Simulator app requires several other large directories from the Xcode distribution in order to work at all. The only official way to install all of those properly is to install the entire SDK from the dmg. Then you can experiment with deleting the hopefully "unneeded" directories. Be prepared to start over if you delete something that the Simulator requires.
Simulator 应用程序需要 Xcode 发行版中的其他几个大目录才能工作。正确安装所有这些的唯一官方方法是从 dmg 安装整个 SDK。然后您可以尝试删除希望“不需要”的目录。如果您删除了模拟器所需的内容,请准备好重新开始。
回答by WrightsCS
You would have to extract the Simulator pkg from the Xcode DMG. The only thing is that the Simulator depends on having an SDK installed, that way it knows which iOS to run the app in.
您必须从 Xcode DMG 中提取 Simulator pkg。唯一的问题是模拟器依赖于安装了 SDK,这样它就知道在哪个 iOS 上运行应用程序。