0

The app I'm working on builds & runs just fine in the iPhone Simulator, but, when I try to test it on an iPhone 4S, XCode says, "Finished running ..." immediately after I click "Run", and, when I look at the iPhone, there's no icon for the app at all. It's as though XCode doesn't detect that XCode isn't deploying the app to the device.

I've got a signed certificate, a developer profile, and a valid provisioning profile (XCode's Organizer says so). The provisioning profile is present on the iPhone.

I've tried restoring the iPhone, and I still get the same error.

How do I successfully deploy my app to the iPhone?

Edit:

It's deep in the comments of the below answer, but the problem was that I had a misspelled within Info.plist's required Required device capabilities section. I solved it by deleting that row.

Jarred Sumner
  • 1,793
  • 6
  • 33
  • 45
  • While I personally find this question intriguing, it really isn't related to programming and should be moved elsewhere. – Michael Dorst Jul 09 '12 at 21:20
  • 3
    @MichaelDorst Stack Overflow covers programming tools as well (see the FAQ), so this is the best place for these types of questions (plus the fact that there is no other suitable SE site for them). – Evan Mulawski Jul 09 '12 at 21:23
  • @Evan my bad. Is it possible to un-flag a post? – Michael Dorst Jul 09 '12 at 21:25

1 Answers1

2

few things to check:

clean your build folders and rebuild. In Xcode project navigator, under products folder, is your app present?

open iTunes and try dragging this app into iTunes. Will it show up in iTunes or do you get an error? if it shows up, can you install it to iPhone via iTunes?

Is you iPhone iOS version and Xcode version and build settings all in sync? I know some version of Xcode 4.x have issues build and running apps on iOS 4.x.

Augie
  • 1,341
  • 1
  • 11
  • 18
  • The app is present in the builds folder. But, when I try to install it from iTunes, I get the error message, "The app was not installed on the iPhone because it is not compatible with this iPhone." The question now is, Why isn't the app compatible with an iPhone 4S? It builds specifically for iOS 5.1 (The iPhone 4S runs 5.1.1), and it has iphoneos listed under "Supported Platforms" in the Build Settings. "arm7" as well as "arm6" is listed in the Valid Architectures. What am I missing here? – Jarred Sumner Jul 09 '12 at 21:38
  • hmmm...hardware shouldn't matter, just iOS version, gotta be something small in settings, did you change build type from 'iPhone 5.1 simulator' to 'iOS device', have 'application requires iPhone environment = yes' in info.plist, build target settings 'iOS deployment target' and 'base sdk' aren't higher version than iPhone? It sounds like you're provisioning profile, bundle id are set up correctly, else your error would be different. – Augie Jul 09 '12 at 21:46
  • By build type, do you mean the button next to [the app name](http://i.imgur.com/PAINi.png)? If so, that's changed to the specific iPhone (as you can see). "application requires iPhone environment" is set to yes. iOS Deployment Target and Base SDK version are both set to 5.1 – Jarred Sumner Jul 09 '12 at 21:50
  • also, hold down option key and click 'run'. in the popup window, is destination = iOS device and build configuration option correct? – Augie Jul 09 '12 at 21:51
  • Yeah, the destination is set to the iPhone 4S and the build configuration option is set to "Debug" (as it should) – Jarred Sumner Jul 09 '12 at 21:53
  • right, build type = destination type. I've seen Xcode do strange things with building to a specific device, rare but has happened specially in early Xcode 4.x releases. try unhooking your device, and building just to 'iOS device' instead of your specific iPhone's name, then try to put app on iPhone via iTunes. – Augie Jul 09 '12 at 21:54
  • I got the same error as I did when I manually drag'n'dropped the iPhone app from XCode's build directory into the iPhone on iTunes. – Jarred Sumner Jul 09 '12 at 21:59
  • 1
    my last ideas, if you have a 'required device capabilities' in you info.plist, try removing it. And these are fresh builds, i.e.. hold down option key, click product menu -> clean build folder? and they aren't archive app builds? – Augie Jul 09 '12 at 22:00
  • That did it. Thank you! (Required device capabilities) – Jarred Sumner Jul 09 '12 at 22:03