Background user location when app is terminated/suspended

后端 未结 6 2144
感情败类
感情败类 2020-12-08 20:14

I\'ve been trying to figure out how to get the user\'s location when the app is terminated like how the app Moves does it. The only way I know of doing so is with Significan

6条回答
  •  南笙
    南笙 (楼主)
    2020-12-08 20:44

    The only solution is to use background mode with CoreLocation. If your app requires iOS 8, the system will relaunch your app, even if force quit by the user. This is documented in Apple Docs:

    In most cases, the system does not relaunch apps after they are force quit by the user. One exception is location apps, which in iOS 8 and later are relaunched after being force quit by the user. In other cases, though, the user must launch the app explicitly or reboot the device before the app can be launched automatically into the background by the system.

提交回复
热议问题