Post

Replies

Boosts

Views

Activity

Reply to Connecting to a bluetooth device while app is terminated
You could also look into sending a silent background push to wake up the app when it is killed. When this data message is delivered, iOS will launch your app in the background and it can connect to a saved BLE peripheral to transmit data. While it is possible to work, the delivery is not 100% reliable and depends on a number of factors like low power modes, system budgets, rate limiting, etc. More info here: https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/pushing_background_updates_to_your_app https://developer.apple.com/videos/play/wwdc2020/10063/
Oct ’23
Reply to Silent Background Push Notification not working in Release build.
I got this working using FCM and Notifee, but I've tested it on a few devices and it hasn't been 100% reliable. On one device, it works flawlessly in all states (foreground, background, killed) and is able to launch the app in the background after receiving a silent notification. So it is definitely possible... However, it hasn't been consistent across all test devices. One device doesn't wake up when the app is force quit by the user, but works in other cases. It seems like there are just too many variables :/ Apple's documentation even states: "The system treats background notifications as low priority: you can use them to refresh your app’s content, but the system doesn’t guarantee their delivery." Anyway, these resources were helpful for me: https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/pushing_background_updates_to_your_app https://developer.apple.com/videos/play/wwdc2019/707 https://rnfirebase.io/messaging/usage#data-only-messages https://notifee.app/react-native/docs/integrations/fcm
Oct ’23