xcode iPhone 模拟器失败

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/591799/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-14 18:29:42  来源:igfitidea点击:

iPhone simulator fails

iphonexcodeios-simulator

提问by Etam

I have a fresh iPhone project. When I "Build and Go":

我有一个新的 iPhone 项目。当我“构建并运行”时:

Error from Debugger: Failed to launch simulated application: iPhone Simulator failed to install the application.

来自调试器的错误:无法启动模拟应用程序:iPhone 模拟器无法安装应用程序。

Why is that?!

这是为什么?!

回答by Alotor

You need to remove the folder as sudo ~/Library/Application Support/iPhone Simulator

您需要将文件夹删除为 sudo ~/Library/Application Support/iPhone Simulator

sudo rm -Rfv ~/Library/Application\ Support/iPhone\ Simulator

It looks like previous versions of the SDK have some kind of permission trouble.

看起来以前版本的 SDK 有某种权限问题。

回答by Dana Holt

You don't have to sign code to run in the simulator, only for running on real devices.

您无需签署代码即可在模拟器中运行,只需在真实设备上运行即可。

Was the app running in the simulator successfully before? If so, did you make changes to the app since? Maybe try rolling them back until it starts working again to identify where the problem is.

之前在模拟器中运行成功了吗?如果是这样,您是否对应用程序进行了更改?也许尝试回滚它们,直到它再次开始工作以确定问题出在哪里。

Can other apps run in the simulator, or is the problem isolated to one particular app?

其他应用程序是否可以在模拟器中运行,或者问题是否与某个特定应用程序相关?

Take a look at this article.

看看这篇文章

回答by NeilInglis

Have you tried opening the simulator from /Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone Simulator.app

您是否尝试从 /Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone Simulator.app 打开模拟器

and checking if anything (ie Mail, Safari, etc) works in the simulator? That'd tell you at least whether the Simulator is broken or there's something wrong with deployment.

并检查是否有任何东西(即邮件、Safari 等)在模拟器中有效?这至少可以告诉您模拟器是否损坏或部署有问题。

回答by NeilInglis

I had this problem too! I deleted the folder "/Library/Application\ Support/iPhone\ Simulator" in my user directory. Started the simulator again and it started right up.

我也有这个问题!我删除了用户目录中的文件夹“/Library/Application\ Support/iPhone\ Simulator”。再次启动模拟器,它立即启动。

回答by Brian Ferris

I ran into a similar situation where my home directory was on an NFS share. Deleting my "~/Library/Application Support/iPhone Simulator" directory didn't help, but sym-linking that directory to a location on my local disk did fix the problem.

我遇到了类似的情况,我的主目录位于 NFS 共享上。删除我的“~/Library/Application Support/iPhone Simulator”目录没有帮助,但是将该目录符号链接到我本地磁盘上的某个位置确实解决了这个问题。

回答by commanda

I just solved this problem by reinstalling the SDK (iphone_sdk_3.1_beta_3__leopard) and restarting my machine.

我刚刚通过重新安装 SDK(iphone_sdk_3.1_beta_3__leopard)并重新启动我的机器解决了这个问题。

回答by possen

After renaming the application the app would not launch in simulator. I was getting the above error. I tried most of the suggestions above, checked all my settings in the plist, also checked the build settings, and nothing worked. What worked for me was to reset the simulator.

重命名应用程序后,应用程序不会在模拟器中启动。我收到了上述错误。我尝试了上面的大部分建议,检查了 plist 中的所有设置,还检查了构建设置,但没有任何效果。对我有用的是重置模拟器。

回答by AITAALI_ABDERRAHMANE

try to "reset content and settings" on ios simulator menu

尝试在 ios 模拟器菜单上“重置内容和设置”