We have a client that runs our app in `guided access mode`.
The app runs flawlessly for 2 days consecutively, but after that the iPad suddenly lags, sometimes crashes and reopens, and after that the screen goes black.
If they press the home button the screen goes active with the app still running. if they close the app, reopen it and restart `guided access mode` the same thing will happen much sooner.
A complete reboot is required, and after that the app will run flawlessly again for 2 days
We've done extensive testing on our side, but are unable to reproduce the issue. Intensive usage of the app doesn't seem to trigger the issue sooner than 2 days. However if you use the app too little or not at all and it'll keep running fine.
Does anyone know what might be happening here and how we can prevent it?
To my knowledge an app shouldn't be able to break the Kiosk mode and let the device go to standby.
Some general information:
- The app was built with React Native
- We use the Lottie library for animations and standard js timers to trigger certain events
- Turning off some of the animations seems to postpone the 'crash'
- The iPads are placed in a stand and use a nonstandard charging cable
- I've monitored the app and was unable to find a memory leak
I found an entry in the device logs that seems to happen alongside the issue, but I was unable to determine if it's a cause or a result of the issue.
Date/Time: 2018-03-18 11:51:21.622654 +0100
OS Version: iPhone OS 11.2.6 (Build 15D100)
Architecture: arm64
Report Version: 19
Command: AppName
Path: /private/var/containers/Bundle/Application/2CBF6CD5-361E-41B3-8BFD-B80F73360F49/AppName.app/AppName
Version: 1.17 (12)
Beta Identifier: FB6349BF-3B73-4519-8FE2-852CC4FFC82B
Parent: launchd [1]
PID: 187
Event: wakeups
Wakeups: 45001 wakeups over the last 299 seconds (150 wakeups per second average), exceeding limit of 150 wakeups per second over 300 seconds
Action taken: none
Duration: 299.27s
Steps: 119
Hardware model: iPad6,11
Active cpus: 2
Powerstats for: AppName [187]
UUID: 3A4499E3-13C5-361C-B591-1429A6E9F52A
Start time: 2018-03-18 11:54:52 +0100
End time: 2018-03-18 11:56:19 +0100
Microstackshots: 119 samples (100%)
Primary state: 89 samples Frontmost App, User mode, Effective Thread QoS User Interactive, Requested Thread QoS User Interactive, Override Thread QoS Unspecified
User Activity: 0 samples Idle, 119 samples Active
Power Source: 0 samples on Battery, 119 samples on AC
We have a client that runs our app in
.guided access mode
In actual Guided Access Mode? Or in one of the various single app modes that the system supports?
Note For a list of such modes, see the posts on this thread.
It sounds like your app is triggering some sort of resource leak, although it’s hard to say whether that’s a leak in the app itself or a leak in the system that the app just happens to provoke. If you run the app by itself, not in any sort of single app mode, for two days, does it also trigger the problem? If so, it may be amenable to standard leak testing tools (like Instruments).
I've monitored the app and was unable to find a memory leak
To be clear, I’m talking about resource leaks in general, not just memory leaks. There are lots of other resources you can leak that will make your app unhappy over time. The system should prevent such leaks from affecting the system as a whole, but that protection is never perfect.
Oh, and regardless of what else you do, if you have an app that can mess up the system as a whole such that only a restart clears the problem, that is most definitely a bug. Please reproduce the problem and then trigger a sysdiagnose (see the instructions on our Bug Reporting > Profiles and Logs page), then file a bug report that includes that sysdiagnose.
Share and Enjoy
—
Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
let myEmail = "eskimo" + "1" + "@apple.com"