This blog has moved to http://dhilipsiva.com/blog/
This post is outdated.
It has been 4 months since I have been developing for Apple (iOS). As a user, I am in love with Apple. But as a developer, I feel Apple is a crap. I mean, It treats developers like a piece of crap. I hate tools that apple provide for developers. Often buggy. I loved Microsoft from a developers perspective. Okie, to the subject now. I found this really annoying problem with Xcode and fixed it. When you run a project on Xcode, you sometimes end up with a message like this:
Could not launch app - No such file or directory
Thats really annoying. This error happens in a number of different situations. Sometime restarting the Xcode, fixes the problem. If not, follow these steps:
- Disconnect your device.
- Delete the app from your device.
- Quit xcode (Don't just simply close the window, quit it)
- Delete derived data folder (~/Library/Developer/Xcode/DerivedData/
-gbrvhlvwmpiobxdujegtghggrffp - or something like that) Now start Xcode, connect device and run the project. It should work fine.
There it is.
EDIT: Weird. Even theses steps are not helping me sometimes. I dont know what is causing this problem. When everything else fails, restarting both Mac and iOS device solved the issue in some situation. And what is weirder? Some times the app just runs fine the next day, without me changing anything. I know I am not practicing an elegant solution, but this is the only working solution I found so far. If you have any Ideas, you can mail me. I ll update this post as necessary. BTW, this is the post with most hits on my blog. 20,000 and counting! :)
EDIT: Weird. Even theses steps are not helping me sometimes. I dont know what is causing this problem. When everything else fails, restarting both Mac and iOS device solved the issue in some situation. And what is weirder? Some times the app just runs fine the next day, without me changing anything. I know I am not practicing an elegant solution, but this is the only working solution I found so far. If you have any Ideas, you can mail me. I ll update this post as necessary. BTW, this is the post with most hits on my blog. 20,000 and counting! :)
This worked wonderfully, thanks again!
ReplyDelete:)
DeleteThank you!
ReplyDelete:)
DeleteI swear to god, when I become a bazillionaire I am gonna hire all you helpful blogger types! well done sir and thank you!
ReplyDelete:) Always Happy to help :)
Deletethanks for your pointer, but when building for armv6 the first time (with a recently created armv7 project), it may be that cause: http://stackoverflow.com/questions/11802547/armv6-and-armv7/
ReplyDeleteOh my god I love you. This was the answer to my problem. Every single answer I found online was wrong, except for this. I also was trying to test something on an older iOS device, and removing this from the plist file was the answer.
DeleteYes this totally worked for me. THANK YOU!
ReplyDeleteThank you!!!
ReplyDeleteSimply restarting worked for me, thanks
ReplyDeleteStill doesn't work for me. Any other workaround?
ReplyDeleteDid you try mro's link in the above comments?
Deletehttp://stackoverflow.com/questions/11802547/armv6-and-armv7/
do you consider this an elegant solution ? there must be a reason, surely stupid one, why the Xcode is not able to find that file despite it's there in the right place ...
ReplyDeleteNever said this was an elegant solution. Just blogging whatever worked for me. And from the previous comments, I can see that it worked for many of the others too. :) ;)
Delete
ReplyDeleteQue grande eres
<\spanish>
Thanks, the protect works again. You are a big boy...
It worked perfectly, thank you for your help!
ReplyDeleteThis is Mike from Germany and I want to thank you for this fast solution.
ReplyDeleteVielen Lieben Dank.
Greetz Mike
Thank you :-) You saved me!!
ReplyDeleteTotally worked for me, thanks for sharing!
ReplyDeleteThanks for sharing, this works to me!
ReplyDeletethanks for the fix!!!!
ReplyDeletetotally agree about apple treating devs like crap.
Bullshit its working now... thanks buddy..
ReplyDeleteThanks a lot!
ReplyDeleteYES. Thank you.
ReplyDeleteExcellent! Thanks a lot!
ReplyDeleteIf you're fixing to update apps that have previously been launched in the Apple Store, you could get all that non-sense. This has been my case. I do agree that XCode should do a better job of dealing with situations like this. Have you been faced with the challenge of dealing with source code that has been deprecated in iOS 6 yet?
ReplyDeleteYes, I did face that situation. And I fixed it. :)
DeleteSolved my problem - thanks.
ReplyDeletethis is great - was so annoyed for a while... thank you for sharing!
ReplyDeletefor xcode 4.5 all steps work but step 3 wasn't needed for me. after step 4 I received a message that file could not be found. no app icon installed on device. ran project again and all is working perfect.
ReplyDeleteit solved my problem in a project which is newly build but a same problem occur if i used to build a code that has developed on xCode3 but now i am using xCOde 4.5.1 and it gives that error
ReplyDeleteThe error was coming from the fact that I played with the "Devices" option, changing from Universal to Phone, and XCode automatically changed the option "Deployment Target" to 6.0. I was not trying to run on an 6.0 device, hence the error.
ReplyDeleteDidn't find the "~/Library/Developer/Xcode ... "
ReplyDeletebut, once I quite Xcode - then restarted ( without discontenting my iPhone ) it worked perfect.
You're AWESOME!!!!!!!!
Thank you
Thank you very much!
ReplyDeleteThanks, saved a lot of time!
ReplyDelete-Tried to update XCode via the AppStore.
Didn't work, had to delete XCode from Applications.
-Freshly installed XCode
-Created a new project
-Got the "Could not launch app - No such file or directory Error"
Following your solution, the problems were gone.
Thank you :)
ReplyDeleteDeleting folder helped: ~/Library/Developer/Xcode/DerivedData/-gbrvhlvwmpiobxdujegtghggrffp
ReplyDeleteThanks bro this same me from a severe headache
ReplyDeleteThats awesome!!! Thanku!!!
ReplyDeleteThanks man. I have not read all the comments but I wonder what causes this. I think it happened for me when fiddling about with the signing certificates.
ReplyDeletegreat work
ReplyDeleteI was dubious it would work because it seemed so far fetched, but it did work perfectly. Thank you very much!
ReplyDeletereadings were really very good. I will bookmark this blog so that I could often visit this blog often to read the latest article from your blog. behind terimaksih awaited visit, .......
ReplyDeleteios development jakarta | firzil.co.id