I have Flutter application which receive and process (upload to server) data from BLE device. According to iOS background modes, application should be kept alive or waken up once BLE message is received. So if I receive this messages every second application should stay alive in background.
The problem is that it only works sometimes (like 10 hours of uninterrupted session), but for most cases application just quietly stops, even having BLE connected and transferring data. Could happen after 5 minutes or after an hour, always different.
And I can't catch any logs of what is the problem. I am using:
- Global handlers: setUncaughtExceptionHandler, setSignalHandler
- Delegate methods: applicationWillTerminate, applicationDidReceiveMemoryWarning, applicationProtectedDataWillBecomeUnavailable,
All of these I'm sending to Flutter through a method channel to write log to file. And I see nothing in logs, just interrupted normal flow with BLE transaction and data uploading.
Any ideas how can I found out why my application is stopping?