Core Bluetooth and backgrounding: Detection of a device and triggering an action, even after being days in background mode?

后端 未结 3 1361
猫巷女王i
猫巷女王i 2021-01-30 02:38

I\'ve written an app that needs to get informed when a certain Bluetooth Low Energy device comes within range. If the BLE device gets noticed my app just stores a timestamp.

3条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-30 03:16

    No, iOS gives no guarantee that your app keeps alive in the background. The docs say:

    However, this method may be called in situations where the application is running in the background (not suspended) and the system needs to terminate it for some reason.

    (Documentation of applicationWillTerminate)

提交回复
热议问题