Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iPhone App in suspended state, launched by URL, showing Default.png

Tags:

ios

iphone

The app responds to a custom URL, and correctly launches when in a suspended state. The question is, can I disable showing the Default.png when launched this way?

A use case for clarity:

  1. app is started normally
  2. a home button press puts app in standby
  3. a url of the scheme the app recognizes is tapped in mobile safari
  4. users sees Default.png before launch is complete.

As you probably know, when fast app switching activates usually the app is redisplayed with a screenshot of the last state rather than the Default.png. This is what I'd prefer happens when the URL launch takes place also.

like image 263
NWCoder Avatar asked Oct 28 '10 22:10

NWCoder


1 Answers

It sounds like what is going on is that Fast App Switching is not actually working. So:

  1. Make sure you are building the application for SDK for OS 4.0. If you don't, you app will not have fast app switching support.

  2. See if fast app switching normally (otherwise) works with your application. I.E. when you just switch to safari, then re-launch your application, do you get the "default.png"?

  3. Run the app under the debugger, but on your actual device. Make the problem happen, go into the Organizer, and look under device logs. This will show you if there was a low-memory issue which caused your application to be terminated, when Safari was launched, thus requiring it to be re-launched when the URL was selected.

  4. I believe there were two mechanisms in place. In my app, I do not support "Launch with URL" - but what I do do is support the Application Delegate's call:

-(BOOL) application:(UIApplication *) application handleOpenURL:(NSURL *) url {

This may be the difference - this is the call which can be made to an application that is running to hand it a URL to process. If you are using the other technique, use this one instead. I use this, and do not see the "default.png" - i.e. do not evoke a "clean relaunch" when I get called.

like image 100
Brad Avatar answered Sep 28 '22 02:09

Brad