iPhone - Multiple instances of an application running? - iphone

When i start my app for the first time after installing it and exit before the splash screen disappears, from then on launching from the multitasking menu it comes up with a black screen. If I click on it from the home screen it loads fine but every time I try from the multitasking menu it is a black screen until I terminate it. If I add the UIApplcationExitOnSuspend property to the properties list the black screen continually appears until i restart the device. Any help is appreciated.
Thanks Sj

A couple things:
You probably don't want to suspend your app prior to the splash screen disappearing. applicationDidFinishLaunching is running code (you know, like adding a window to the app) while the splash screen is showing. If you suspend it early, it doesn't have a chance. This may not be the case after the first time install but if I were you, I'd give it the time it needs to do initial install instead of interrupting it.
Another less likely scenario: Are you doing this while the debug is still running? I've only had an issue similar to this (black screen after suspend) if I leave debug running and then suspend the app to the background. As soon as you bring it back out of the background, you get a black screen, so in that case it's a bug. If you hit the stop sign button in XCode to kill the app, it worked fine after that.. but you have to kill it before suspending it.
My guess is your likely cause is #1. Give the app more time to do the initial load. After that, it should be fine. For whatever reason, the first time installing/loading is always the slowest.

Related

Flutter: How to get rid of the first touch delay?

I have a little issue with Flutter.
I did a clean install and everything works smoothly.
Nonetheless, there is a delay of half a second between my touch and the action of a button (or menu hamburger).
This delay exists only for the first touch action.
After the first touch / click, any further touch action is without delay.
This problem exists on the emulator but also on a real device.
Could you explain to me why (and how to fix it)?
Thanks to #RandalSchwartz the problem is now solved.
Flutter applications are slower in development mode (with the hot reload).
This cause the app to have a delay with the first touch action (on a button or hamburger menu for example).
This also cause the app to have a long splash screen in development mode (around 3 seconds)
Therefore the solution is pretty simple if you want to get rid of all the waiting times, just launch you app in release mode with the following command:
"flutter run --release"

How to relaunch an Air-based iOS application from the very first page?

My application is an Air-based iPhone app. It opens with the last page I visited before clicking the Home button, each time I relaunch the app, while I need to open with the splash screen onward. How can I resolve this issue?
Thank you for any help.
When you press the Home button, you don't terminate a running app. I'm sure that many of us developers have stuck with this mental model of how iOS used to work without multitasking.
So, the splash screen, or rather, the default image (Default.png) should really appear once (when your application launches). Some times, the default image appears when coming out from the background state, but this happens only if your app takes too long to show its UI. In fact, on fast iPhones, the default image disappears almost instantly even on launch (for well-written apps, that is).
I should also note that Apple actively discourages the use of the default image for splash screens. These should only be used for creating an illusion of transition, from a "launching state" (which the default image is supposed to portray), to the running state.
However, if you really have to show a splash screen every time, you should implement such a mechanism in code. applicationDidBecomeActive: is a good place to start, if you are writing code in Objective-C.
I don't know the event model in Air, so I can't really give you any hints for that.
The above answer, though old, does not answer the question. Sure, Apple gives guidelines regarding splash screen and all, but the poster asks how to prevent the app from resuming from it's previous position. If you want the app to terminate when put in the background you need to look into the UIApplicationExitsOnSuspend option. There's also an Adobe blog post explaining a bit more about different background behaviors.

iPhone returns to black screen after sleep interrupt during splash screen

I've got a strange bug going on that seems to be OS related : If I give a sleep interrupt to my device while the OS controlled splash screen, Default.png, is displayed, and then immediately wake the device, I get a black screen until applicationDidFinishLaunching: is called and the OS passes control to my app.
It would be nice if upon waking the device, Default.png still displayed properly. I put some logs in to see when the interrupt handlers (applicationWillResignActive: etc.) get called, but they never do - I think the interrupt is happening too soon.
Any ideas on how to avoid returning to a black screen?
Thanks in advance!
You don't have any control over the splash screen how long it will display. The Default.png file will show while the app is being set up, but will disappear as soon as the app is ready to launch.
If you need more time to finish loading, you should create another view that looks like the splash screen that you have control over.
Just know that Apple is prickly when it comes to how the splash screen is used. They are of the opinion that your app shouldn't have one anyway. So be careful how long you sit on an empty/splash screen. Display a progress view or activity indicator to let the user know that you haven't crashed and are still working.

iPhone/iOS App runs fine, but if I force quit by deleting it from the running programs crashes on next start

Ok, I'm confused..
I have an app that if I launch and use runs fine.. However if I click on the home button pausing the app, and then go into the list of running apps by double clicking the home button, and then delete the app instance in that list, effectively killing/ending that app run, and go back and click on the icon to launch the app fresh, the app simply hangs with a blank black screen... every time I try to start the app after that first time I get this problem.
Is there some event I need to handle in my app, to make sure it cleans itself up properly for relaunch?
I am admittedly confused and would appreciate any help.
I had the same weird problem, then i have realized that this only happens if you run the application through the XCODE (Debug Mode).
The application locks because the debugger/xcode receives the SIGNKILL and locks the application so you can inspect the code.
If you run the application directly from the device the application gets killed and does not remain locked on the screen :)
Even one year later, i had the same problem, so hope that helps someone that has the same problem.

iphone app if backgrounded and then killed from fast access bar, on next restart will crash with SIGKILL and iphone will turn black

So the iphone app that I have created...
if it is backgrounded for another app or something...
And then is killed using the fast action switcher.
next restart of app crashes app
Iphone turns black screen with status bar at top and just gets stuck there.
If I then double tap home button I can see a faint line come up to slightly show where perhaps the fast app switcher is..
crazy weird. though Id like to handle this correctly.. Ideas?
thanks!
Try running it without the debugger attached.