Bluetooth Background Image for iOS

I want to continue scanning for Bluetooth devices, and I want the application to be live in the background. Is it possible? It looks like if I have a connected Bluetooth device, and if there is data transfer, then the application does not work in the background. However, if I just scan in the background, it seems that even if I have Uses Bluetooth LE accessories checked ( bluetooth-central in plist), the application does not work.

Is there a way to save the application in real time and continuously scan devices when it is in the background?

+5
source share
1 answer

If your application will not be released on the Apple Store, you can use any of the background modes described here . Please read this entire article if you do not understand the background execution in iOS - it is important that you know this as an iOS developer.

You also don't seem to understand how Core Bluetooth works in the background, so please read this article .

In short: you need a good reason to keep your app in the background indefinitely and be accepted by the Apple Store Review.

EDIT:

What OP means is that the device did not wake up. Decision. You need to listen to a specific BLE service in CoreBluetooth to start waking up.

+5
source

Source: https://habr.com/ru/post/1237503/


All Articles