Xcode 4 says "finished running <my app>" on the targeted device -- Nothing happens

36,666

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).

enter image description here

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:

enter image description here

Double click on 'Standard (armv7)' to add another, then click the '+' in the popup, and type in 'armv6':

enter image description here

Click done and it should look like this:

enter image description here

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.

Share:
36,666

Related videos on Youtube

D-Nice
Author by

D-Nice

Updated on June 04, 2020

Comments

  • D-Nice
    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
      kennbrodhagen about 13 years
      If 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
      D-Nice about 13 years
      Created a new project template and it worked. So now we know that something must be misconfigured in my project.
    • Adam Johnson
      Adam Johnson almost 13 years
      D-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
    D-Nice about 13 years
    There'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
    Rob about 13 years
    How are you supposed to test apps that require gamekit on the device itself, then?
  • Graham Perks
    Graham Perks almost 13 years
    You 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
    abscondment almost 13 years
    Exactly what I was looking for.
  • Lukasz
    Lukasz over 12 years
    That was the main cause for me. So easy to forget it. Thanks.
  • pauloya
    pauloya over 12 years
    For adding the "armv6" option, see this: stackoverflow.com/questions/7488657/…
  • Admin
    Admin over 12 years
    this 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
    Ariel Malka over 12 years
    Bingo: I had to do the two steps described in order to run properly on my old iPhone 3G. Thanks MattyG!
  • IcyBlueRose
    IcyBlueRose over 12 years
    Thanks 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
    alekhine over 12 years
    Thanks for your efforts to explain the procedure in detail.
  • progrmr
    progrmr over 12 years
    My older iPod Touch must also be armv6 because this fixed worked for it too.
  • Jamie Chapman
    Jamie Chapman over 12 years
    Wish I'd seen this sooner, would have saved me a few hours of pain! Thanks.
  • M.Y.
    M.Y. over 12 years
    WTF! why compiler doesn't even promt! Thank you Matty.
  • mac
    mac over 12 years
    your app supports accelerometer?
  • TheJerkMan24
    TheJerkMan24 over 12 years
    Fantastic, 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
    ocean over 12 years
    Thanks a millions times! This saved my life.
  • axiixc
    axiixc over 12 years
    Yeah, I'm pretty sure the original iPhone, 3G, and the first two iPod touches were armv6.
  • Sam Jarman
    Sam Jarman over 12 years
    there is no build directory for mine? weird.
  • Tyler Collier
    Tyler Collier over 12 years
    MattyG 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
    Harry Wood over 12 years
    Thanks from me too! Many people have suggested of adding in 'armv6', but removing armv7 is the trick!
  • Dustin Pfannenstiel
    Dustin Pfannenstiel about 12 years
    Kudos good sir. I've been trying to figure this out for a while (on and off).
  • GeneCode
    GeneCode about 12 years
    Yup, this is the reason for my case. No idea how the "Required device capabilities" of armv7 got in the plist. Thanks!
  • Oded Regev
    Oded Regev about 12 years
    "Delete armv7 from the 'Required device capabilities' in yourProjectName-Info.plist" --> Thanks
  • theiOSDude
    theiOSDude about 12 years
    I had this issue when setting deployment target to 5.1 when my device was only upto 5.0.1 - cheers mate +1
  • mrueg
    mrueg almost 12 years
    Another case that leads to the same problem is if you added an empty entry to the required device capabilities.
  • Namratha
    Namratha almost 12 years
    Thanks! This happens often. Each time I try something new! Is this a bug in Xcode?