Xcode 6 process launch failed: timed out trying to launch app

I can't debug my app because when I run it, Xcode gives me the error:

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.

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.

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.

Answers


You are using distribution provisioning profile rather than development profile. check this link


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!

I think that iTunes was the problem.


EDIT: 2017/02: Solution still Woks (Thanks to @SalGad for information).


I am using Xcode 6.2, running on iPhone 4 with iOS 7.1.2, the problems happen to me as well.

It turned out that the Project and Targets' Code Signing settings are different from each other! And that's what is causing the issue.

To solve the issue, you must make sure that their Code Signing settings is the same.


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.

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.


I had this but nothing previously posted seemed to work. This is what I did to fix the issue in Xcode 6.3.2:

  1. Go to Product->Scheme->Edit Scheme...
  2. Select the Run Scheme
  3. Select the Info tab
  4. Make sure the settings are as follows:
    • Build Configuration is set to "Debug"
    • Debug Executable is checked
    • Launch Automatically is checked

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

That fixed the problem


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.


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 !!


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.

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


I have faced this issue with Xcode 6.2 and Iphone 5s with iOS version 8.3.

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.


Big and weird tip for this problem... this was happening to me and none of the advice helped anywhere on the web, but then i noticed if i deleted everything out of the main ViewDidLoad method it would work. I realized there was one line of code that was messing it up. It was a line that was referencing to an array of strings that was way to big. I had something like this NSString *mystring[100][1000][100]; i accidentally added some zeros and for whatever reason this problem produced the same error message that the incorrect signing gives you. So don't let your arrays or matrixes get too out of hand!


Method #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.

Method #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.

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


Need Your Help

How do I allow android app alpha/beta testers to download the app for free?

android google-play android-testing

I have an application that I want to release for $x amount to the public, however, I want to allow the Google Developer Console Alpha/Beta APK to be downloaded for free. I want the testers to be ab...

`active' flag or not?

sql mysql postgresql

OK, so practically every database based application has to deal with "non-active" records. Either, soft-deletions or marking something as "to be ignored". I'm curious as to whether there are any ra...