How to wake up the Apple Watch app in the background

On iPhone, we can use iBeacon to wake up the APP in the background for Bluetooth scanning connection, now we want to port the function to AppleWatch APP, but the API related to iBeacon is not applicable on watchOS, does watchOS have a similar wake up mechanism?

Answered by Engineer in 811972022

The APIs needed for detecting iBeacons are not available on watchOS. If your beacon devices are able to advertise as a generic BLE device, you can use CoreBluetooth to wake up your watch app (albeit in a limited fashion).

You can find information about how that works on watchOS from Get timely alerts from Bluetooth devices on watchOS

and the related sample code Interacting with Bluetooth peripherals during background app refresh

We need users to be able to wake up the AppleWatch APP automatically when they are near an iBeacon Bluetooth device while wearing the AppleWatch (we don't know when the user is going to be near it), rather than timing it and waiting for a clearly expected moment to wake up the APP

Look into push notifications with a deep link or universal link.

The APIs needed for detecting iBeacons are not available on watchOS. If your beacon devices are able to advertise as a generic BLE device, you can use CoreBluetooth to wake up your watch app (albeit in a limited fashion).

You can find information about how that works on watchOS from Get timely alerts from Bluetooth devices on watchOS

and the related sample code Interacting with Bluetooth peripherals during background app refresh

How to wake up the Apple Watch app in the background
 
 
Q