iOS App terminated permanently when Killed although stopOnTerminate is set false
tangjh opened this issue · 2 comments
Your Environment
- Plugin version: ^1.9.0-beta.4
- Platform: iOS
- OS version: 11.4.1
- Device manufacturer / model: Apple / iPhone SE
- Nativescript version (
tns info
):
✔ Getting NativeScript components versions information...
⚠ Update available for component nativescript. Your current version is 4.1.2 and the latest available version is 4.2.4.
⚠ Update available for component tns-core-modules. Your current version is 4.1.1 and the latest available version is 4.2.1.
✖ Component tns-android is not installed.
⚠ Update available for component tns-ios. Your current version is 4.1.1 and the latest available version is 4.2.0.
-
Plugin config
reset: true, debug: true, logLevel: BackgroundGeolocation.LOG_LEVEL_VERBOSE, desiredAccuracy: BackgroundGeolocation.DESIRED_ACCURACY_HIGH, distanceFilter: 1, stopTimeout: 1, autoSync: true, stopOnTerminate: false, startOnBoot: true, foregroundService: true, heartbeatInterval: 60, username: 'transistor-ns', enableHeadless: true
Expected Behavior
The Background GeoLocation service should continue.
Actual Behavior
The app got terminated with the following message:
....
{"msg":"state transition", "event":"state_transition", "state":"LocationManager", "id":"0x1c020a410", "property":"updatingLocation", "old":1, "new":0}
[TSBackgroundFetch onAppTerminate]
[TSBackgroundFetch stop]
Steps to Reproduce
- Start App
- Let it run and receive notification of movement
- Double click on Home button
- Swipe to remove the app
Context
Testing the library to make sure it can be used for project
Debug logs
See above ... [Actual Behavior]
There's nothing you can do to stop the user from terminating an app if that's their will.
However, when that device moves about 200 meters, iOS will relaunch your app in the background and tracking will resume.
- See docs
stopOnTerminate
- See Demo Video
It does for TS. But not for NG version.