我正在苹果 watch 上开发一个应用程序,它需要持续访问陀螺仪和加速度计数据。但是一旦 watch 旋转,屏幕就会关闭,并且显然在屏幕关闭时它会停止访问运动数据。我试图让屏幕保持打开状态,但 Apple Watch 没有该功能,对此有何想法? 谢谢
最佳答案
您需要启动 HKWorkoutSession .
The app can continue to access data from Apple Watch’s sensors in the background, letting you keep the app up to date at all times. For example, a running app can continue to track the user’s heart rate, ensuring that the most recent heart rate data is displayed whenever the user raises their wrist.
关于ios - 如何在Apple Watch上继续收集运动传感器数据?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57173013/