Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 452
D-Nice Avatar asked Mar 13 '11 20:03

D-Nice


13 Answers

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

like image 57
MattyG Avatar answered Oct 17 '22 08:10

MattyG


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.

like image 35
axiixc Avatar answered Oct 17 '22 09:10

axiixc


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.

like image 45
Jeremy Flores Avatar answered Oct 17 '22 10:10

Jeremy Flores


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!

like image 45
Johann Avatar answered Oct 17 '22 09:10

Johann


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.

like image 35
SPitBalls.com Avatar answered Oct 17 '22 08:10

SPitBalls.com


I just had this too. I had added a UIRequiredDeviceCapabilities section to info.plist, requiring gamekit, and the app would not get copied onto an iPhone 3G running iOS 4.2. Removed the required capability, all is well.

like image 24
Graham Perks Avatar answered Oct 17 '22 10:10

Graham Perks


Try deleting the app on the device (just like your usual app uninstall) and running it from Xcode again. Helped me with the same problem, apart from the simulator not working.

like image 25
Tomek Kopczuk Avatar answered Oct 17 '22 10:10

Tomek Kopczuk


Mine case: I mistakenly set the: Required device capabilities -> accelerometer to NO (in Info.plist). Just have to set it back to YES

Also: Make sure that the Required device capabilities is of the proper type: i.e. Boolean or String. The wrong type will invariably make the test fail, and the app not load.

like image 36
Casey Avatar answered Oct 17 '22 10:10

Casey


For those still floundering, another thing that I had to do was make the name of my target's product the same for Debug and Release configurations. It had been "running" the Debug version, which I was not building.

like image 31
Luke Avatar answered Oct 17 '22 10:10

Luke


adding armv6 architecture fixed this for me.

like image 20
red_car Avatar answered Oct 17 '22 10:10

red_car


Happens to me sometimes as well. Doing clean (Product menu -> Clean) and run (Project menu -> Run) always fixes it.

like image 44
TheBlack Avatar answered Oct 17 '22 09:10

TheBlack


I had the same problem: migrated a project from xcode3 to xcode4, and after building the app, xcode did not want to install and start the App on my phone.

My solution (that worked for me) is:

  • Edit your scheme (which is meant to be run)
  • In the list on the left, select 'Run xyz.app'
  • Under the info tab, at Executable I had '.app' selected. Change this by browsing to your build directory and choosing your app.

Worked for me, and from now on I can use: 'Product -> Perform Action -> Run without building', for running the latest build. This is faster then simply pressing Run, as no build actions will be taken.

like image 30
bxantus Avatar answered Oct 17 '22 10:10

bxantus


Just restart the device. Do an clean project. Delete the app from the device and Rebuild.

like image 35
Alex Terente Avatar answered Oct 17 '22 08:10

Alex Terente