iOS Splash screen appears when application is reloaded from background - ios

The splash screen of my app is showing when I reload the app after clicking the home button. It doesn't happen every time. It only happens when I press the home button while the app is creating a movie with AVFoundation and the reload the app.
Anyone have any idea why this is happening and how can I tackle the problem?
Thanks a lot!

It sounds like your app is actually being shut down, not just put in the background. It may be doing too much processing after being sent to the background so that the OS kills the app.

Related

iOS 14 app killed immediately after being minimized and receiving snapshot warning

My IOS 14 app is always being killed immediately when it is being minimized. I have already added background modes: background fetch and background processing. However, when the app goes into the background and I switch to another app, XCode is telling me this:
Snapshotting a view (0x7f91ed844000, UIKeyboardImpl) that has not been rendered at least once requires afterScreenUpdates:YES
So I thought maybe the app can't create screenshots for the app switcher and Apple then just kills the app. My problem is that the message doesn't tell me how I can add this to the view. The documentation doesn't help me either also Google and searching here doesn't help. Everything I find is about how to take a screenshot and save it somewhere which is not what I am trying to do. Does anyone have an idea how I can approach this problem?
Thank you very much!

showing splash screen on cold start of app links

I'm adding app linking to my android app and I'm noticing on cold starts there's this long period of a white screen, which the user could interpret it as the app is not responding.
I have a splash screen for normal operation of the app on the main activity using a special theme, but it looks like app linking bypasses that activity so is there a way to show a splash screen on the other screens when the app is accessed by a link action?
EDIT:
quick summary, the splash screen appears during the normal use of the app but when a link triggers the app to open, it's not.
I figured out a solution for myself.
I simplified the intent filters to all call from the main activity that has the splash screen so it will appear now on cold starts.
this cleaned up a few other issues so it's a win overall for me.

Do apps like Twitter implement custom relaunching when opened from background?

I've noticed that when I go off an app like Snapchat, Twitter etc for a few seconds then go back on it, it opens from background as expected, on to the view controller I was last on. However, if I go off the app for more than a few minutes, when I tap on the app it loads the splash screen again and opens the home page.
I initially thought this was standard iOS behaviour, but when I installed my app onto my device I have noticed that even if I go off it for hours, when I come back onto it, the last view controller I was on is shown.
I have thought about checking how long the app was in background by saving times in NSUserDefaults, but don't actually know if this is the right way of going about achieving that kind of behaviour?
Thanks!

Show splash screen instead of snapshot

My issue is with the splash screen shown when the app opens while in suspended mode.
When the app is closed and i open it, i see the Default.png splash screen, which is what i need.
But if i send it to the background and reopen it, i see a snapshot from the last screen i was in, and i want to see the splash screen.
I have even considered forcing the app to quit on when entering background, but i'd rather show a snapshot than do this.
How can i accomplish this?
Thank you.
You can't change the image that is shown when the app starts (Default.png) or enters the foreground (snapshot of previous app state).
Ask yourself, how would showing a splash screen each time the app enters the foreground improve the user experience?
Edit: Here's a guess at a workaround:
Based on your comment below, it sounds like you're saying it would be OK if the user always came back to the main action screen. In the applicationWillResignActive: method, could you check what screen the users is on, and if it's not the main action screen, move back to that screen... the snapshot would be of the main action screen then (maybe!)

iPhone: Is it possible to close the app rather than run in background when user clicks Home Button?

I have an app which crashes everytime when I resume it.
I want that when user clicks Home button, the app should close rather than go in background mode.
Is that possible?
If yes, please let me know.
If not, what could be the workaround so that my app does not crash when I resume it?
Thanks!
In the plist, set YES to Application does not run in background key.
When ur application is in background, due to memory insufficient, the views (and the objects released in viewDidUnload) might be released. Again when reopen the application, make sure all the required objects are re-initialized.
To opt out of background execution, see this thread... But ideally what you should do is fix the crash and let app user enjoy iOS background feature..
what could be the workaround so that my app does not crash when I
resume it?
Never think of work arounds when you can handle it straight..

Resources