I am developing an iOS app kind of similar to functionality of Apple's air tag tracker app.
My app doing dead reckoning using CMPedometer
and Accelerometer
. Dead reckoning should start after receive a accurate gps location (I have enabled Location updates
background mode)
There are some calculations execute at the same time to measure walking distance, calibration algorithms to dead reckoning and communicate with the target object via bluetooth once the user(app) is in communicating distance with the object.
In this case, target object act as Bluetooth central and App act as the bluetooth peripheral. So, I have enabled Acts as a Bluetooth LE accessory
background mode as well.
Currently I have implemented the dead reckoning and calibrations. App working in the foreground. But the main requirement is to work in background also.
I have read few articles and documentation about iOS background modes and it seems very restricted to execute algorithm.
My intention is to start dead reckoning and algorithm based on a trigger from gps or bluetooth device.
At thing moment, I still haven't implement any codes for background processing, more of a feasibility study at the moment. As per my understanding Background fetch
and Background processing
both scheduled by the iOS, so these two ways will not help. Possible ways could be act upon a bluetooth trigger, act upon a location update or background push. Highly appreciated your thoughts on these approaches.
https://developer.apple.com/forums/thread/685525
https://developer.apple.com/videos/play/wwdc2020/10063/
https://developer.apple.com/documentation/xcode/configuring-background-execution-modes