101

yesterday I installed Xcode 4.4.

I'm working on a project which needs to run on ios 4.1 upwards, supporting iOS device with camera. Until I installed Xcode 4.4 everything went well, and I can test app on iphone 3gs and 4s. After I installed Xcode 4.4 I was unable to test app on iphone 3gs, and everytime I try to do it, xcode shows me that message: - Could not lauch "appname". timed out for app to lauch -

Does someone have any idea how to get rid of that error?

Macarse
  • 91,829
  • 44
  • 175
  • 230
notsoux
  • 1,605
  • 3
  • 14
  • 19
  • What is the iOS version on your 3Gs? Assuming it is 4.1, check in XCode preferences whether you have Device debugging support for 4.1 installed or not – Vin Jul 27 '12 at 07:57

12 Answers12

268

I had a similar issue when trying to debug an App with Ad-Hoc provisioning... Check which provisioning you're using, it seems ad-hoc provisioning cannot be used for debugging.

EDIT In fact, it seems only development provisioning profiles are Ok for debugging

Vinzzz
  • 11,746
  • 5
  • 36
  • 42
  • Yup, this did it for me. Thanks! – jemmons Aug 16 '12 at 22:04
  • 2
    Yep. I think previous Xcode versions had a different warning about this. – BastiBen Aug 17 '12 at 10:10
  • 40
    Apple should read stackoverflow and fix their tools based on answers like this! – viggio24 Oct 12 '12 at 11:01
  • Solved for me too. Problem still there even in the newest Xcode 4.5++ – Gerd Nov 19 '12 at 10:30
  • I was trying to debug with a Enterprise Dist cert selected. Switched back to my development cert and the issue was resolved-- thanks! – RyanG Nov 19 '12 at 20:15
  • "this is not a bug, it's a feature" ;-) – Vinzzz Jan 12 '13 at 03:07
  • After clearing my derived data 91203 times, this was the solution! Thnx :D – Rick van der Linde Feb 19 '13 at 14:28
  • I was getting the "timed out" drop down error message, but the app would go ahead and install and run on my phone. But the app would crash when it tried to load a pdf into a Google Docs Viewer. The fix recommended here fixed both issues. – pdschuller Aug 16 '13 at 15:31
  • Thanks! but I still can't get how "Timed out waiting for app to launch" can be connected to the provision issue :) – Danil Jun 20 '14 at 04:15
  • As @RyanG mentioned, any non-development profile/cert will produce this error. Accidentally used the App Store configuration to deploy an app on my phone and I experienced this error. Switching back to the development one fixed the problem. – ianthetechie Aug 17 '14 at 22:27
  • So... what if you need to debug an app with a release build? – anavarroma Nov 12 '14 at 11:16
  • 'EDIT In fact, it seems only development provisioning profiles are Ok for debugging' -- is there any source to that statement? – anavarroma Nov 12 '14 at 11:17
  • No, this is from personal experience :) – Vinzzz Nov 12 '14 at 13:49
4

scheme configuration For me:
Under Edit Scheme
For the Run configuration
On the Info tab
For Build Configuration
I had Release selected

But, it needs to be on Debug to run locally on a device.

bearMountain
  • 3,950
  • 1
  • 36
  • 44
  • But does it not have to be able to run set to release for apple to be able to test it out? Im getting a crash rejection because it crashes on first run. The only way I've been able to replicate this crash is by setting Buid config: to release. – Andres Canella Nov 22 '12 at 16:28
  • @AndresCanella Sorry, I am not familiar with App Store review policies regarding this setting. – bearMountain Nov 29 '12 at 00:48
  • Is there a way around this, given that it would be useful to be able to test on a real device under a release build before submitting to the App Store? – Bryce Thomas Jun 06 '13 at 02:48
3

I had a similar issue. In my case the reason was that I changed the setting for Launch ( xcode -> product -> Edit Scheme) to Wait and forgot about it.

When I changed the setting back to Automatic, the app will launch as usual.

B.M. Lam
  • 31
  • 3
2

I also had same problem. I deleted old provisioning & distribution profiles from the testing devices and installed the modified profiles. The date of these provisioning profiles matter. The error timedout got solved.

1

Remove the app from the device/simulator and try again, should work. Looks to be a bug in xcode.

  • I haven't done anything special, but problems don't happens so often anymore and it become something possible to cope with...hope in future upgrade from apple :). Thanks! – notsoux Aug 31 '12 at 18:38
1

It is issue of Provisioning profile. I was using Distribution Provisioning Profile. Changed back to Development Provisioning profile from Developer portal and used that, Solved the issue.

Mann
  • 5,477
  • 6
  • 45
  • 57
1

This worked for me on XCode 4.6 iOS 6.1.2

  • Open Organizer
  • Select your device from the left
  • Add to Portal
  • Enter you Developer credentials
  • Close Organizer and in the project file under your target select "Build Settings" -> "Code Signing Identity" pick the profile "iOS Team Provisioning Profile"
  • Clean and run.
edaype
  • 31
  • 2
1

I had same problem now I resolved it ..

Follow these step to sort out the problem.

Step:1 Go to xcode folder like this

enter image description here

Step2: Reach to folder xcode->DerivedData

Step3: Delete all folder inside of DerivedData

It will work for you Thanks

SachinVsSachin
  • 6,401
  • 3
  • 33
  • 39
0

Try to remove you app from simulator and/or reset simulator settings.

Simulator settings could be different from old one.

Generally, resetting everything works well.

BenMorel
  • 34,448
  • 50
  • 182
  • 322
elp
  • 8,021
  • 7
  • 61
  • 120
  • Thanks for your answer :)...My problem is about testing app on real devices, but applied what you have told me, just to be sure to try everything ;)! – notsoux Jul 27 '12 at 07:52
  • it's the same... try remove your app, restart your device, restart xcode or better your mac. Try this and let me know. – elp Jul 27 '12 at 08:31
  • Did you find a solution to this? Same thing here, Xcode 4.4 has been a massive fail so far! – Rog Jul 30 '12 at 06:17
  • it happened to me a lot of times, but removing everithing fix the issue. But I dont't know what's the problem. – elp Jul 30 '12 at 07:45
0

Old question but adding my solution for rare cases like mine. Removing app from device/ clean-build/ provisioning changes did not work for me. I restarted the Xcode and it started working fine.

Obj-Swift
  • 2,802
  • 3
  • 29
  • 50
0

In my case the cause turned out to be the launch daemon being unable to load the app icons and crashing. Even though it didn't look like a crash - the device and the OS were becoming very slow or totally unresponsive. I figured this by analysing the crash logs. (My icons were too large - about 2,500x2,500 - I simply forgot to reduce their sizes properly before adding them to resources). Hope this helps someone.

mojuba
  • 11,842
  • 9
  • 51
  • 72
0

I tried all solution above with no success. But when I did complete cleanup of my iPhone 4S with iOS 7 this problem never occurred again.

FunkyMonkey
  • 21
  • 2
  • 4