App builds for iOS but doesn't open on hardware. Tips or thoughts on how to approach?

Hi All,

I’m running into a circumstance where my current project works fine in the simulator and appears to build correctly but when I place the build onto an iOS device (iPhone 3, 4S or 1st Gen iPad) it fails to open.

Does anyone have any thoughts as far as how I should approach solving this challenge?

To be more specific, when I press the icon to launch the app, I get a very quick black screen as if the app is attempting to open but then almost instantly the device goes back to the “desktop” (sorry, spacing on what one would call the “desktop” of a mobile device…)

I’ve had this happen periodically in the past and it’s always sorted it’s self out (either by working on at least one of the three devices or by just powering on with my work and then later builds working fine). At this point the app fails on all three devices and as I get closer to completion I guess I find this more concerning as far as the possibility of the app not working on hardware.

Thanks for any tips anyone has regarding what they think could be an issue or ideas as far as how to continue investigating this.

Well, I deleted the app off my 4S directly (from the phone it’s self) and then reinstalled the built app from Xcode and now it runs on the device…

Maybe I just need to reinstall if I run into this problem again?

When it happens, have you looked in the Xcode console to see if there are any error messages?  It sounds like iOS is force-killing your app while it’s loading, in which case there should be some message in the console that would indicate why.

  • Andrew

Hi Andrew,

That’s a great tip but I’m actually not sure how to do that! I really don’t have any experience with Xcode, I just know how to open the organizer window so that I can drop my built app files into my devices.

What’s the approach for connecting to the device to see any error codes?

It’s actually very easy. In Organizer, when your device is connected, you’ll see it listed on the left with a green dot. Click Console, and you’ll be able to see the logs on your device (including print statements from Corona) as your app runs.

Awesome! Will try that out this morning. Thanks for explaining that :slight_smile:

lol… I’ve tried this out and had no idea a person could get the same output one gets from the simulator from the actual build on hardware. This seems like one of those capabilities that I will now consider essential and it will seem odd that I ever worked without it.

Very useful, thanks again :slight_smile:

No problem, happy to help.  :-)

And you’re right, it’s 100% completely essential!

  • Andrew

Well, I deleted the app off my 4S directly (from the phone it’s self) and then reinstalled the built app from Xcode and now it runs on the device…

Maybe I just need to reinstall if I run into this problem again?

When it happens, have you looked in the Xcode console to see if there are any error messages?  It sounds like iOS is force-killing your app while it’s loading, in which case there should be some message in the console that would indicate why.

  • Andrew

Hi Andrew,

That’s a great tip but I’m actually not sure how to do that! I really don’t have any experience with Xcode, I just know how to open the organizer window so that I can drop my built app files into my devices.

What’s the approach for connecting to the device to see any error codes?

It’s actually very easy. In Organizer, when your device is connected, you’ll see it listed on the left with a green dot. Click Console, and you’ll be able to see the logs on your device (including print statements from Corona) as your app runs.

Awesome! Will try that out this morning. Thanks for explaining that :slight_smile:

lol… I’ve tried this out and had no idea a person could get the same output one gets from the simulator from the actual build on hardware. This seems like one of those capabilities that I will now consider essential and it will seem odd that I ever worked without it.

Very useful, thanks again :slight_smile:

No problem, happy to help.  :-)

And you’re right, it’s 100% completely essential!

  • Andrew

Definitely essential to test using real device and run it through xcode’s console to check where you might have an issue. The only problem I find is trying to figure out what on earth those cryptic codes mean as they don’t really help solve a lot of issues.

See:  http://coronalabs.com/blog/2013/07/09/tutorial-basic-debugging/

We try to help break down how to read the errors printed there.  But even if you can’t figure out the error, posting the error message here will let people with more experience reading those cryptic codes a better chance to help you.

Definitely essential to test using real device and run it through xcode’s console to check where you might have an issue. The only problem I find is trying to figure out what on earth those cryptic codes mean as they don’t really help solve a lot of issues.

See:  http://coronalabs.com/blog/2013/07/09/tutorial-basic-debugging/

We try to help break down how to read the errors printed there.  But even if you can’t figure out the error, posting the error message here will let people with more experience reading those cryptic codes a better chance to help you.