1

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

smartsanja
  • 4,413
  • 9
  • 58
  • 106
  • 1
    You should read the notes on [The bluetooth-peripheral Background Execution Mode](https://developer.apple.com/library/archive/documentation/NetworkingInternetWeb/Conceptual/CoreBluetooth_concepts/CoreBluetoothBackgroundProcessingForIOSApps/PerformingTasksWhileYourAppIsInTheBackground.html#//apple_ref/doc/uid/TP40013257-CH7-SW1) - Specifically your iOS device acting as a peripheral in the background will only be discoverable by other iOS devices actively looking for your service. A generic BLE central will not discover your peripheral. – Paulw11 Oct 18 '22 at 05:50
  • 1
    Also, CMPedometer does not deliver step updates in the background. – Paulw11 Oct 18 '22 at 05:51

0 Answers0