I am developing a navigation like app. It works fine for the location manager to get the device's current location both in foreground and background.
In foreground it works fine for however long. However, when the app goes to background mode, initially the location manager works well. But after around 2 minutes, the app exited and the console shows the error message saying: "Message from debugger: Terminated due to signal 9."
I searched the error message, but still could not find the solution to it. Quitting app causes error "Message from debugger: Terminated due to signal 9"
I noticed the CPU usage is very high, around 105% in background mode. This could be the reason that the OS send the KILL signal. But even if I decrease the location manager's accuracy (but for navigation purpose I still need the highest accuracy ultimately), the problem is still there.
So I am really wondering how those fitness apps managed to track user's locations in the background for however long without being killed by the OS.