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

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!

Related

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.

Start app and navigate to the view previously displayed

I have an app (iOS, Swift) which is usually started in the morning by the user. The user will press a couple of buttons, enter some text, move to other views (using a navigation controller) and so on. When everything is filled out the right way, the user will put the iPhone into standby mode. As far as the app life cycle is concerned, it will enter the background state. When the user opens the app again, he will still be on the same page, with the same parameter, ... Everything is fine.
In case of a suspended app (due to a lack of resources or other stuff), the app will start again from the beginning and not from the view where the user has navigated to before. In such a case, what's the best way to navigate to the specific view the user was when bringing the phone into the standby mode and keep respectively build up the whole navigation stack as it was before the suspension?
You can use Apple state restoration and preservation technique for this purpose. Here you can find an example provided by Apple.
Hope this will help.

Validating iOS screen for user errors

I have developed an iOS enterprise app for iPad. When it is launched it connects to a webservice, gets some data, and stores it in Core Data. Then the next screens use this data and do what is needed, like fill UITextFields, drop downs, show the user a UIAlertView, etc. Basically i use the data, manipulate it, and save it.
Consider this: I install the app now in morning, I use it immediately, and then I click the home button on iPad and leave it there for couple of hours. I then launch the app, and it shows a black screen before crashing and going back to iPad main menu.
Why is it crashing like that? Any ideas?
If you need more information please let me know.
You need to check your logs for errors.
Plug your device to your computer and open Xcode/Organizer/Devices/Device Logs

iOS App Goes Dim

Very difficult issue to figure out...this only happens on a real device not plugged in. When my app loads up to the main view, i show a wait dialog while a few background threads fire off and search for products. this takes about 5-7 seconds. If I load the app and about 1-3 seconds in, i close the app and go to another app, then come back to my app, the screen dims around the edges and the app just freezes.
I did a few google searches for this screen dimming and couldn't find anything
The app never crashes.

how to hide splash when the app is coming back from background?

I just set the 'Application does not run in background' parameter of my ios app to NO and I added the relevant refreshes in applicationDidBecomeActive: in my application delegate then it works pretty well. But when I switch back to my app, the splash screen still appear during one second. How to remove it and display directly the app ?
I though it was impossible, but it remembered me this topic : Prevent Splash Screen from showing after returning from background
It seems to include an answer to your question...
Also, don't forget to try on the device, sometimes the simulator does weird things.

Resources