ios Xcode 6 进程启动失败:尝试启动应用程序超时
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/26032085/
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
Xcode 6 process launch failed: timed out trying to launch app
提问by Tenaciousd93
I can't debug my app because when I run it, Xcode gives me the error:
我无法调试我的应用程序,因为当我运行它时,Xcode 给了我错误:
Process launch failed: timed out trying to launch app
进程启动失败:尝试启动应用程序超时
In the device I see a black screen and after the error message the app starts. How can I fix this?
在设备中,我看到黑屏,在出现错误消息后,应用程序启动。我怎样才能解决这个问题?
I tried to change the code signing identity and the provisioning profile, and to refresh the provisioning profiles in the Xcode > Preferences > Accounts > Details tab.
我尝试更改代码签名标识和配置文件,并在 Xcode > Preferences > Accounts > Details 选项卡中刷新配置文件。
I'm using Xcode Version 6.0.1 (6A317) with an iPad mini, running iOS 8.0 and a MacBook with OSX 10.9.4.
我将 Xcode 版本 6.0.1 (6A317) 与 iPad mini 一起使用,运行 iOS 8.0 和运行 OSX 10.9.4 的 MacBook。
After this, if the iPad goes into sleep mode (the screen turns off) I can't wake it anymore; I have to do a soft reset.
在此之后,如果 iPad 进入睡眠模式(屏幕关闭),我将无法再唤醒它;我必须进行软重置。
采纳答案by Tenaciousd93
How to Fix:
怎么修:
I fix it with:
我修复它:
- clean project (Product > Clean)
- hard reset device (power button + home button)
- delete app from device
- close xcode
- CLOSE ITUNES(itunes must be closed)
- re-open Xcode and run!
- 清洁项目(产品 > 清洁)
- 硬复位设备(电源键+主页键)
- 从设备中删除应用程序
- 关闭 xcode
- 关闭iTunes(iTunes 必须关闭)
- 重新打开Xcode并运行!
I think that iTunes was the problem.
我认为 iTunes 是问题所在。
EDIT: 2017/02:Solution still Woks (Thanks to @SalGad for information).
编辑:2017/02:解决方案仍然可用(感谢@SalGad 提供信息)。
回答by Ishu
回答by KarenAnne
I am using Xcode 6.2, running on iPhone 4 with iOS 7.1.2, the problems happen to me as well.
我正在使用 Xcode 6.2,在装有 iOS 7.1.2 的 iPhone 4 上运行,问题也发生在我身上。
It turned out that the Project and Targets' Code Signing
settings are different from each other! And that's what is causing the issue.
原来是Project and Targets' Code Signing
设置不一样啊!这就是导致问题的原因。
To solve the issue, you must make sure that their Code Signing settings is the same.
要解决此问题,您必须确保他们的代码签名设置相同。
回答by kas-kad
One more thing that may be a reason to launch timeout arising is that you have a lot of Provision Profiles on your device. I have about 100 of them, downloaded automatically by XCode from our team dev portal. So if your team have tons of apps and Provision Profiles, you better unlink your XCode from your Apple ID, to prevent automatic downloading for unwanted PPs. It significantly decreases app launching time.
可能导致启动超时的另一件事是您的设备上有很多配置文件。我有大约 100 个,由 XCode 从我们的团队开发门户自动下载。因此,如果您的团队拥有大量应用程序和配置文件,您最好取消 XCode 与 Apple ID 的链接,以防止自动下载不需要的 PP。它显着减少了应用程序的启动时间。
To delete unwanted PPs from your device you have to go XCode - Window - Devices, select your device and click "Show provision profiles..." on the bottom context menu. Then you have to manually remove the profiles. Tip: use key sequences "down arrow" - "backspace", to ease the hand routine.
要从您的设备中删除不需要的 PP,您必须转到 XCode - 窗口 - 设备,选择您的设备并单击底部上下文菜单中的“显示配置文件...”。然后您必须手动删除配置文件。提示:使用按键序列“向下箭头”-“退格”,以减轻手动操作。
回答by DustinB
I had this but nothing previously posted seemed to work. This is what I did to fix the issue in Xcode 6.3.2:
我有这个,但以前发布的任何内容似乎都不起作用。这是我为解决 Xcode 6.3.2 中的问题所做的工作:
- Go to Product->Scheme->Edit Scheme...
- Select the Run Scheme
- Select the Info tab
- Make sure the settings are as follows:
- Build Configuration is set to "Debug"
- Debug Executable is checked
- Launch Automatically is checked
- 转到产品->方案->编辑方案...
- 选择运行方案
- 选择信息选项卡
- 确保设置如下:
- 构建配置设置为“调试”
- 调试可执行文件被选中
- 自动启动被选中
回答by Upendar Gareri
This warning is shown when you try to run and debug your code directly in device but you are using distribution profile in your Build Settings. To directly run the code in device and debug, you need to use development profile in your Build Settings of Xcode. After setting the development profile, just reboot your device clean your Xcode project and run again. I hope this helps !!
当您尝试直接在设备中运行和调试代码但您在构建设置中使用分发配置文件时,会显示此警告。要直接在设备中运行代码并进行调试,您需要在 Xcode 的构建设置中使用开发配置文件。设置开发配置文件后,只需重新启动您的设备,清理您的 Xcode 项目并再次运行。我希望这有帮助 !!
回答by Jerome Thomere
In my case I was using the development profile, but somehow, in Build Settings > Code Signing, the Provisioning Profile for Debug was empty.
就我而言,我使用的是开发配置文件,但不知何故,在构建设置 > 代码签名中,调试的配置文件是空的。
But before setting it to "iOS Team Provisioning Profile", I had to reset my account since it said " is Not on Any Development teams" - Xcode > Preferences > Accounts - Remove my account (click "-") - Add the account again
但是在将其设置为“iOS 团队配置文件”之前,我必须重置我的帐户,因为它说“不在任何开发团队中”-Xcode > 首选项 > 帐户-删除我的帐户(单击“-”)-再次添加帐户
That fixed the problem
这解决了问题
回答by Guillaume Laurent
Note that if the app still manages to start on the device after Xcode displays this error, you can attach to the running process with Debug->Attach to Process.
请注意,如果在 Xcode 显示此错误后应用程序仍然设法在设备上启动,您可以使用 Debug->Attach to Process 附加到正在运行的进程。
回答by tomsoft
An app should return from his initialisation procedure in less then 10 seconds, or it will be killed by the OS. This is probably because you are doing too many things in the startup phase.
应用程序应该在不到 10 秒的时间内从其初始化过程中返回,否则它将被操作系统杀死。这可能是因为你在启动阶段做了太多的事情。
Try to refactor your code to do it diffrently, by doing lazy initialisation, and only initialize what is really important before showing the first view.
尝试重构您的代码以进行不同的操作,通过进行延迟初始化,并且仅在显示第一个视图之前初始化真正重要的内容。
It's hard to give better advice before knowing more about the app itself
在了解更多关于应用程序本身之前,很难给出更好的建议
回答by Ram Prateek
I have faced this issue with Xcode 6.2and Iphone 5swith iOS version 8.3.
我在Xcode 6.2和iOS 版本 8.3 的Iphone 5s上遇到过这个问题。
I get this message when I deploy the application to the device for the first time.
我第一次将应用程序部署到设备时收到此消息。
The work around I found was that with out unintalling the application from the device,redeploy the application from Xcode.It should run perfectly this time. I observed this only on Xcode 6.2 not on Xcode 6.3 so this might be an Xcode to iOS version compatibility issue.
我发现的解决方法是,无需从设备上卸载应用程序,从 Xcode 重新部署应用程序。这次应该可以完美运行。我只在 Xcode 6.2 上而不是在 Xcode 6.3 上观察到这一点,所以这可能是 Xcode 到 iOS 版本的兼容性问题。