Xcode 4 says "finished running <my app>" on the targeted device -- Nothing happens
Solution 1
For those reading this in regards to Xcode 4.2, and attempting to run on an earlier device (e.g. iPhone 3G, 2G, iPod 1st gen, etc) I have another solution. New projects created in Xcode 4.2 by default specify 'armv7' in the 'Required Device Capabilities'. You'll need to remove this if wanting to support devices that run armv6 (e.g. the iPhone 3G).
Delete armv7 from the 'Required device capabilities' in yourProjectName-Info.plist
You may also need to change the build settings to compile with armv6 instead of armv7.
This is the default:
Double click on 'Standard (armv7)' to add another, then click the '+' in the popup, and type in 'armv6':
Click done and it should look like this:
Solution 2
I just had this problem, but for me it was because I only specified armv7 in my architectures, but the 3G is armv6. Make sure you have both.
Solution 3
I had this issue, and it turns out that XCode was defaulting the Deployment Target to 4.3, whereas my phone is 4.2.1. Changing the Deployment Target to 4.0 seemed resolve it.
Solution 4
After you add "armv6" to the Project and Targets' architectures, make sure you don't have "armv7" in your "Required device capabilities" section of your info.plist. If so just remove it and it should work!
Solution 5
Same problem here with the app not running on the device. Deleting the app from the device didn't help. Project -> Clean then Project -> Run again didn't help either. Turned out that just Quitting and restarting Xcode 4 solved it.
Related videos on Youtube
D-Nice
Updated on June 04, 2020Comments
-
D-Nice almost 4 years
The app neither installs nor runs on my device. All provisioning profiles are up to date. I've already tried deleting and re-installing them.
The status bar shows that Xcode is building my project, then it says running my project on , then it says "finished running ." Throughout this entire period, the iPod screen stays black. The iPod is being detected in the Organizer and I don't see anything wrong with its configuration. Everything was working perfectly just a couple days ago with Xcode 3.
It doesn't work on the simulator, but it may be important to note that in the simulator it appears to get stuck on "Attaching to " and the simulator refuses to start.
-
kennbrodhagen about 13 yearsIf you create a brand-new project using one of the xcode templates and try to run it in either the simulator or the device will it work? I'm trying to determine if the install/configuration of xcode is broken or if something in the app you are asking about is influencing the behavior.
-
D-Nice about 13 yearsCreated a new project template and it worked. So now we know that something must be misconfigured in my project.
-
Adam Johnson almost 13 yearsD-Nice, did you ever solve this? I'm having this exact same issue with my game, and I cannot solve it for the life of me.
-
-
D-Nice about 13 yearsThere's no trace of the app on the device any longer. I no longer think this is a provisioning issue... there's something that got corrupted in my project, but I have no clue as to what it may be.
-
Rob about 13 yearsHow are you supposed to test apps that require gamekit on the device itself, then?
-
Graham Perks almost 13 yearsYou still get GameCenter without your info.plist saying you require a device that has it. Any device running 4.2 has GameCenter, so there's no need for the additional info.plist "I need it!"
-
abscondment almost 13 yearsExactly what I was looking for.
-
Lukasz over 12 yearsThat was the main cause for me. So easy to forget it. Thanks.
-
pauloya over 12 yearsFor adding the "armv6" option, see this: stackoverflow.com/questions/7488657/…
-
Admin over 12 yearsthis was it for me; the new version of Xcode decides to remove armv6 from the 'Architectures' build setting so you will need to add it back manually
-
Ariel Malka over 12 yearsBingo: I had to do the two steps described in order to run properly on my old iPhone 3G. Thanks MattyG!
-
IcyBlueRose over 12 yearsThanks a million! I'd give you 10 vote ups if I could. I was going through all the scenarios on this page with no luck at all. Somehow that value must have been changed when I upgraded to XCode 4.3.
-
alekhine over 12 yearsThanks for your efforts to explain the procedure in detail.
-
progrmr over 12 yearsMy older iPod Touch must also be armv6 because this fixed worked for it too.
-
Jamie Chapman over 12 yearsWish I'd seen this sooner, would have saved me a few hours of pain! Thanks.
-
M.Y. over 12 yearsWTF! why compiler doesn't even promt! Thank you Matty.
-
mac over 12 yearsyour app supports accelerometer?
-
TheJerkMan24 over 12 yearsFantastic, this was my problem. I didn't have entry in my plist file, so I ignored the first part, but the second part of your posted fixed my issues! Thanks!
-
ocean over 12 yearsThanks a millions times! This saved my life.
-
axiixc over 12 yearsYeah, I'm pretty sure the original iPhone, 3G, and the first two iPod touches were armv6.
-
Sam Jarman over 12 yearsthere is no build directory for mine? weird.
-
Tyler Collier over 12 yearsMattyG says to remove the 'armv7' value in your <TARGET>-Info.plist file. To be clear, this means click the minus button to entirely remove the value. At first, I simply blanked out the value (but left in the subtree value of Item 0), and I still suffered from OP's problem. Be sure to completely delete the subtree Item 0.
-
Harry Wood over 12 yearsThanks from me too! Many people have suggested of adding in 'armv6', but removing armv7 is the trick!
-
Dustin Pfannenstiel about 12 yearsKudos good sir. I've been trying to figure this out for a while (on and off).
-
GeneCode about 12 yearsYup, this is the reason for my case. No idea how the "Required device capabilities" of armv7 got in the plist. Thanks!
-
Oded Regev about 12 years"Delete armv7 from the 'Required device capabilities' in yourProjectName-Info.plist" --> Thanks
-
theiOSDude about 12 yearsI had this issue when setting deployment target to 5.1 when my device was only upto 5.0.1 - cheers mate +1
-
mrueg almost 12 yearsAnother case that leads to the same problem is if you added an empty entry to the required device capabilities.
-
Namratha almost 12 yearsThanks! This happens often. Each time I try something new! Is this a bug in Xcode?