我正在使用 CMMotionManager 和 HKWorkoutSession 开发 Apple Watch 应用程序以获取加速度计和心率数据。该应用程序在短时间内(70 秒)运行良好,但当屏幕关闭时,心率和加速度计数据都会停止。
我的问题是如何从加速度计和心率传感器获得 5 分钟的数据?
accelerometer healthkit apple-watch watchkit watchos-2
accelerometer ×1
apple-watch ×1
healthkit ×1
watchkit ×1
watchos-2 ×1