ios 无法启动进程启动失败:等待应用启动超时

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

Could not launch process launch failed: timed out waiting for app to launch

iosiphonexcodexcode5

提问by user317706

I am trying to launch my app on device. It is launching successfully on the simulator.

我正在尝试在设备上启动我的应用程序。它在模拟器上成功启动。

  • List item
  • I use 7.1 SDK
  • Xcode 5
  • And the device is a 7.1 iPhone 4S
  • 项目清单
  • 我使用 7.1 SDK
  • Xcode 5
  • 该设备是 7.1 iPhone 4S

I have tried:

我试过了:

  • Clean
  • Clean Build Folder
  • Deleting app
  • Disconnecting/Reconnecting device
  • Booting device
  • restarting Xcode
  • 干净的
  • 清理构建文件夹
  • 删除应用
  • 断开/重新连接设备
  • 启动设备
  • 重新启动Xcode

What can I do to make it work?

我该怎么做才能让它发挥作用?

Could it be something with Code Signing?

它可能是代码签名的东西吗?

Currently i have it set to 'Dont Code Sign'

目前我已将其设置为“不要代码签名”

回答by melbic

I had this problem when I used a Distribution certificate instead of Developer one when running the app from Xcode. You may check it out your target --> Build Settings --> Code signing.

当我从 Xcode 运行应用程序时使用分发证书而不是开发人员证书时,我遇到了这个问题。您可以查看您的目标 --> 构建设置 --> 代码签名。

As @AndyDynn pointed out in his comment: Make sure you do this on the "Target" build settings and not just the "Project" build settings.

正如@AndyDynn 在他的评论中指出的那样:确保在“目标”构建设置上执行此操作,而不仅仅是在“项目”构建设置上执行此操作。

回答by Kmb40

I literally restarted my iPad, that was connected for testing the app, and that resolved the issue.

我真的重新启动了我的 iPad,它已连接以测试应用程序,并解决了问题。

回答by morroko

To run your app on a device, you will perform these tasks that follow:

要在设备上运行您的应用程序,您将执行以下任务:

  1. Request a development certificate.

  2. Add your device to the portal.

  3. Code sign your app.

  4. Launch your app on the device.

  1. 申请开发证书。

  2. 将您的设备添加到门户。

  3. 代码签名您的应用程序。

  4. 在设备上启动您的应用程序。

For more detail check this

有关更多详细信息,请检查

回答by Upkesh

If your provisioning profile and code sign everything is alright then try once Quit and Restart your XCode. It will work for me.

如果您的配置文件和代码签名一切正常,请尝试退出并重新启动您的 XCode。它会为我工作。

回答by daidai

I just had this issue. I had to open the app on device and tap Trust Computer. No need for me to reboot everything 20 times, yay.

我刚刚有这个问题。我必须在设备上打开应用程序并点击信任计算机。我不需要重新启动所有东西 20 次,是的。

回答by RainCast

Below are 2 awesome hacks that have not been mentioned yet:

以下是尚未提及的 2 个很棒的 hack:

HACK #1:

黑客 #1:

Lock your phone, press XCode start, wait till XCode says "unlock your device to launch", then unlock your phone, it will be launched successfully, works every time.

锁定您的手机,按 XCode 启动,等待 XCode 说“解锁您的设备以启动”,然后解锁您的手机,它将成功启动,每次都有效

HACK #2:

黑客 #2:

If your goal is just to debug the app, here is another simple and straight-forward approach:

如果您的目标只是调试应用程序,这里是另一种简单直接的方法:

  1. After the app is deployed, launch it manually.
  2. Goto XCode -> Debug -> Attach to Process ... to choose your app from the list, then debug properly.
  1. 部署应用程序后,手动启动它。
  2. 转到 XCode -> 调试 -> 附加到进程...从列表中选择您的应用程序,然后正确调试。

This works well for me, and it saves lots of time. I hope this helps, thanks!

这对我来说效果很好,而且节省了很多时间。我希望这会有所帮助,谢谢!

回答by Jonny

I got the same problem and after looking at the answers here I found mine. The issue at hand was: my dev distribution certificate was gonefrom iOS Dev Center, so I just assume it had timed out. I didn't get a nice warning though, just the above error - installing worked but debugging didn't. So I had Xcode regenerate a new one for me.

我遇到了同样的问题,在查看了这里的答案后,我找到了我的。手头的问题是:我的开发分发证书从 iOS 开发中心消失了,所以我假设它已经超时。虽然我没有得到很好的警告,只是上面的错误 - 安装有效但调试没有。所以我让 Xcode 为我重新生成一个新的。

回答by sunilr

One more thing to try if you've tried the above: i found this link about quitting itunes to avoid the timeout. This works for me with xcode 5.1

如果您尝试过上述操作,请再尝试一件事:我找到了有关退出 iTunes 以避免超时的链接。这适用于 xcode 5.1

回答by Scuttle

I cleaned out my provisional profiles, rebooted the iPhone, rebooted the computer, and it worked for me.

我清理了我的临时配置文件,重新启动了 iPhone,重新启动了计算机,它对我有用。

回答by shortstuffsushi

Just to throw out an additional suggestion to anyone coming across this problem (it's been burning me frequently lately) -- try going to the Targets -> (Your Target) -> General -> Team and re-selecting the same Team, which forces Xcode to update profiles for you.

只是向遇到此问题的任何人提出一个额外的建议(最近它经常让我着急)-尝试转到目标->(您的目标)-> 常规-> 团队并重新选择相同的团队,这会强制Xcode 为您更新配置文件。

That has been the culprit for me a couple of times. Seems to happen specifically if you've recently re-downloaded a distribution certificate for new devices or w/e. Or if you've just dumped your Provisioning Profiles directory in general.

这对我来说是几次罪魁祸首。如果您最近为新设备或 w/e 重新下载了分发证书,似乎会特别发生。或者,如果您刚刚转储了您的 Provisioning Profiles 目录。