Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS Beacon ranging whenever needed

As stated clearly in Apple docs, beacon ranging can be done in background for a short period of time only, say up to 10 seconds by default or up to 3 minutes with the help of background task expiration handler. As per my app's use case, app needs to do beacon ranging for every 15 mins until user exits the region. I am thinking of using background push notification(silent push notification) for this purpose(assuming data connection is available on the device always). So the flow goes like this, upon user entering the region, app calls the server with device token, server sends silent push notification for every 15 minutes. Once app received push notification, it does beacon ranging within allowed period of time if needed. Question I have here is whether using push notification in background mode to do ranging is legal, will I face any issues during app store submission.

Note: Also I need to enable BLE background mode for the app, to read some characteristics from some BLE devices.

like image 366
saikamesh Avatar asked Nov 14 '17 09:11

saikamesh


1 Answers

Technically you can do it, but Apple mostly rejects such app. One important thing you have to consider is that, if the app is manually killed by the user and not running in the background, then the app won't wake up with silent push notification. There is a workaround if you have VoIP push notifications it will wake the app even from the terminated state. But you might need strong reason while pushing it to AppStore.

like image 143
MD Aslam Ansari Avatar answered Sep 29 '22 02:09

MD Aslam Ansari