Xcode:请求打开应用程序失败

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

Xcode : Request to open App failed

iosxcode

提问by yummy

Sometime before everything works fine & running project but right now I am getting issue that request to open App failed.

在一切正常并运行项目之前的某个时候,但现在我遇到了问题request to open App failed

enter image description here

在此处输入图片说明

Does anyone have an idea to fix this and why does this issue occurs?

有没有人有解决这个问题的想法,为什么会出现这个问题?

采纳答案by Mukesh

Cause

原因

Might be you have run different the project sometime before on assume iphone 6s Plus & without closing it or you left it is in the background & now if you are trying to run another project on iphone 5s it's a cause i believe you are facing this issue.

可能你之前在假设 iphone 6s Plus 上运行过不同的项目,没有关闭它,或者你把它留在后台,现在如果你试图在 iphone 5s 上运行另一个项目,这是一个原因,我相信你正面临这个问题.

Fix

使固定

Just quit simulator & run your project again resolved your issue.

只需退出模拟器并再次运行您的项目即可解决您的问题。

More solutions,

更多解决方案,

xcode 8 error denied by service delegate (SBMainWorkspace)

服务委托 (SBMainWorkspace) 拒绝 xcode 8 错误

回答by Mukesh

There is no exact reason why this problem occurs. I've analyzed occurance of this problem can be anyone of following:
- Change in bundle identifier for existing project (running in device or simulator)
- Last running build was not stopped properly or last running build is busy in background.
- Your system/Xcode performing too slower (may be due to Project size or system configuration) and it takes too much time to run your project/build

出现此问题没有确切的原因。我分析过这个问题的发生可以是以下任何一种:
- 现有项目的包标识符的更改(在设备或模拟器中
运行) - 上次运行的构建没有正确停止或上次运行的构建在后台忙。
- 您的系统/Xcode 执行速度太慢(可能是由于项目大小或系统配置)并且运行您的项目/构建需要太多时间

Here are few steps to solve this (Any one or all of these works)
- Clean your XCode
- Clean up project cache and other backup files from Library (It's not user library, press alter option/button keyboard and Click on 'Go' menu of finder) >> Developer >> "Project" directory
- Remove existing build from Device/simulator
- Restart your simulator or device.
- Restart system (Shutdown and again start after few seconds)

这里有几个步骤来解决这个问题(任何一个或所有这些作品)
- 清理你的 XCode
- 从库中清理项目缓存和其他备份文件(它不是用户库,按更改选项/按钮键盘,然后单击“开始”菜单of finder) >> Developer >> "Project" 目录
- 从设备/模拟器中删除现有构建
- 重新启动您的模拟器或设备。
- 重新启动系统(关闭并在几秒钟后再次启动)

This will solve your problem.

这将解决您的问题。

回答by Siriss

I have had this happen a few times. I ran xcrun simctl erase alland reset all my simulators and it fixed it. I think sometimes, if you are switching devices in the simulator, it gets stuck in certain states. Make sure the simulator is quit before running the command in Terminal.

我遇到过几次这种情况。我运行xcrun simctl erase all并重置了我所有的模拟器并修复了它。我认为有时,如果您在模拟器中切换设备,它会卡在某些状态。在终端中运行命令之前,请确保模拟器已退出。

回答by Kiran K

Do this below simple step

执行以下简单步骤

Product > Scheme > Edit Scheme >Run >Info > Build Configuration > debug mode

产品 > 方案 > 编辑方案 > 运行 > 信息 > 构建配置 > 调试模式

回答by kautikmistry

Use

xcrun simctl list

xcrun simctl 列表

to get the list of all simulators

获取所有模拟器的列表

And then

进而

xcrun simctl erase all

xcrun simctl 擦除所有

to reset all the simulators i.e to remove all the data.

重置所有模拟器,即删除所有数据。

First quit the simulator then use this command otherwise you will get an error like this "An error was encountered processing the command (domain=com.apple.CoreSimulator.SimError, code=163. Unable to boot device in current state: Booted"

首先退出模拟器然后使用这个命令,否则你会得到这样的错误“处理命令时遇到错误(域=com.apple.CoreSimulator.SimError,代码=163。无法在当前状态下启动设备:已启动”