I recently updated my iPhone to iOS 17.0 (21A5248v) and my Apple Watch Series 8 to watchOS 10.0 (21R5275t). I'm working with the CMBatchedSensorManager and have confirmed that the authorizationStatus is authorized. Additionally, both isDeviceMotionSupported and isAccelerometerSupported properties return true.
However, when I call the startAccelerometerFetching() function shown below:
@available(watchOS 10.0, *)
func startAccelerometerFetching() async {
do {
for try await accelerometerList in batchedSensorManager.accelerometerUpdates() {
accelerometerList.forEach { self.processAccelerometer($0) }
}
} catch let error as NSError {
print("Encountered Error: \(error.userInfo) \(error.localizedDescription) -> \(error.code) \(error.localizedFailureReason)")
}
}
I receive the following error message:
"Encountered Error: [:] The operation couldn’t be completed. (CMErrorDomain error 109.) -> 109 nil"
Does error code 109 correspond to CMErrorNotAvailable?
How to solve this problem?