App closes when iPhone screen is locked - ios

Whenever i have my app open, then lock my screen, the app closes if the screen is locked for more than 5 minutes. So when I unlock the phone again, I am at my home screen and have to re-open the app.
This happens on both iPhone 6 device and simulator. However, if I build and run the app using the debugger, it doesn't happen, which is making it difficult to fix.
I'd appreciate any suggestions that might point me in the right direction.

Related

Why my app gets closed when I perform a screen-lock test on iOS?

I have Diawi Link for my app and I have download the app from there. Now, while using that if I do the screen lock and unlock after 6 minutes. It have to start with the same screen from where I locked the screen but it closes and I have to start the app from the beginning. Have you any idea regarding that why it is happening?

iOS 11 Single App Mode, Disable lock screen

I'm working on developing a kiosk app to run in single app mode on two 12.9" iPad Pros. We want the option to turn these kiosks off so I'm using the ionic-native Insomnia and Battery-Status plugins to keepAwake when it is plugged in and allowSleepAgain when it is unplugged.
The problem is, the enclosures that were selected to house the iPads completely block all of the buttons, including the home button. When the iPads are plugged back in, the screen turns on and shows the "Press Home to Open" screen. To actually hit the home button, we need to get a key and remove the iPad from the enclosure.
Is there any way, either through the standard iPad preferences, or through the Configurator/Single App Mode preferences, to bypass the lock screen and go directly into the app when it wakes up?
I know I could probably find a way to setBrightness to 0 when unplugged and to 100 when plugged back in. But, that seems less preferable to me than letting it actually go to sleep.
Thanks

Xcode9 made my Iphone7 screen go black

I launched an app with my own iphone7. the app had nothing on it. It is a single page application in IOS. when I ran the app it made my phone's screen go black. I can still get messages and it makes sounds, but the screen is black so I can not use it. How can I fix it?
I assume you're still running the app itself, and because your app has no content, it shows a black screen by default. If that's the case, you can forcibly terminate the app by double-tapping on the Home button, and then swiping down on the problematic app.
As an alternative, you could try soft resetting the device itself, by holding the Sleep button and the Home button at the same time for 10 seconds.
As a last resort, you can hard reset the device under Settings -> General -> Reset -> Erase All Content And Settings. Note that this will erase everything on the device, so should only be attempted if nothing else works.

iOS 8 app goes background in open

After iOS 8 release, we are getting feedback from some users about our app that whenever users try to start app, operating system navigate it to background. I was able to examine this issue myself and I see that OS does not terminate app or app does not crash. In fact, app appears in background apps menu. Whenever user tries to open the app it closes itself something as if “simulating user's home button touch”. Of course, I’m not doing something like this by code. And this issue only show 100 in 1 and only in iOS 8 devices. It shows any kind of devices from iPhone 4S to 5S.
Have you ever encounter an issue like this?

iOS Safari, when running our web-app in stand alone mode, crashes iOS in background

We're developing a web app that extensively uses Cavas 2D for some demos, and is successfully running on both iOS and Android devices. Recently we've added stand-alone mode for iOS devices, so user has to "Add-To-Home-Screen" and run it using screen icon, just like regular app.
What happens recently is that after 10-12 times we start the web app on iPhone4:
Status bar (initially set to 'black') suddenly turns white and we cannot exit Safari (by pressing home button).
If we try to make screen shot (home + power button), shutter sound is played as if screen shot was taken and saved.
If we try to lock the device (power button), screen turns black, but no action after that can bring unlock-screen or any screen for that matter - display remains black.
We can only do reset by pressing home + power for 10 seconds after this point.
If we do not lock the device, web app continuously work with no issues at all, it does not crash, but cannot exit it (double click on home button also has no result).
Has anyone experienced this with their web apps?
Any guidance in how to debug this would be highly appreciated. We've tried using Safari on OSX, connect iPhone to it and use Develop -> iPhone menu but no luck so far.
Thanks in advance!
I would start trying to debug by running XCode with the iPhone connected to the computer.
In XCode open "Organizer" and go to the tab "Devices".
You should see your device there, from which you can view the iOS console. That might be able to tell you what is going wrong with the phone stops responding.
I don't think you have to put the phone in development mode (or be a paid developer) to see the iOS console.

Resources