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.
Related
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.
Assume a game app, where user loads some contents into memory during first open. Afterwards they can:
Move app into background
Lock device
Close app completely
Get a phone call
etc...
Is there a way to know when our app's contents are no longer in memory or something of similar sorts to determine when re-caching of assets is required?
I studied few game apps and they tend to do one of the following
Show loading screen every time app comes back from background
Show loading screen only if device was locked or closed (app is still in the background)
And I'm interested in achieving no.2 to not show loading screens unnecessarily each time app comes back from the background.
You can use AppDelegate method applicationWillTerminate
https://developer.apple.com/documentation/uikit/uiapplicationdelegate/1623111-applicationwillterminate
And notification willTerminateNotification
https://developer.apple.com/documentation/uikit/uiapplication/1623061-willterminatenotification
If Application not terminate you don't need show any loading screen.
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!
I am working on an iOS app in which I have to do numerous calculations in the loop which is running say 5000 times on the main thread. So its taking a little bit time before loading the UI and activity indicator is loading till then.If the app goes background and comes back to foreground the UI freezes for the time till the app completes the loop operation.
One specific thing that I found is that I am getting two status bar in the app which is overlapping each other.you can see time and battery percentage value overlapping each other (Refer Screen Shot below).This only happens when app goes to background and comes back to foreground freezing my Activity Indicator. Even though if I want to replace the activity with a new one or stop and start it again still there is no response and the UI is freezes unless the loop completes its iteration and sometimes leading to app crash as well.
If app calculation is completed (normal case) and then if app goes to back ground and comes back then every thing works smoothly.
Please suggest me whats going wrong with my app.
I am developing an Apple Watch2 App. My app stops running after a few seconds the screen turns into black but I want my app to run on the screen even after the screen turns into black. So that the user can see my app anytime on the screen by not tapping to the app icon again.
I tried to add a timer and then an animation and also made dynamic UI changes to avoid my app to stop running but it didn't work - after a few seconds the screen turns into black, the app stops and the main watch clock screen comes into display.
I saw that it is possible to do this functionality in "Apple Workout App". When the user starts a timer, even if the screen turns into black, the app doesn't stop running so the user checks the timer anytime she/he wants. So please let me know how I can get this functionality?
Thanks,
E.
You can't control this from your app; The user selects the behaviour for their watch using the Apple Watch app on their phone. They can select "Show watch face" (the default) or "Resume Last Activity". They can also select how long the display stays on for on a tap; either 15 or 70 seconds.
Some Apple apps such as Maps, Remote and Timer can override this setting and if a fitness app has an active HealthKit workout activity then the watch will also resume the last activity on wrist raise/face tap. If your app isn't using HealthKit for a workout activity then you have to live with the behaviour the user has selected.