【发布时间】:2020-07-22 19:35:09
【问题描述】:
我正在为 Apple Watch 开发一个非常简单的锻炼应用程序。它使用 Health Kit 来开始和结束锻炼,我唯一的问题是当我尝试结束锻炼时它通常不会结束会话并且我收到此错误
2020-07-22 12:27:46.547720-0700 5k WatchKit Extension[25774:944527] [workouts] <HKWorkoutSession:0x80156310 A54AF52C-8B08-4BAD-A28C-03D8E54044B5 ended>: Failed to end: Error Domain=com.apple.healthkit Code=3 "Unable to transition to the desired state from the Ended(3) state (event 6). Allowed transitions from the current state are: {
7 = "<error(7): Ended(3) -> Ended(3)>";
}" UserInfo={NSLocalizedDescription=Unable to transition to the desired state from the Ended(3) state (event 6). Allowed transitions from the current state are: {
7 = "<error(7): Ended(3) -> Ended(3)>";
}}
我真的不知道从哪里开始从这些信息中寻找问题,我也不知道这意味着什么。此外,通常在第 4 次或第 5 次尝试时,它实际上会结束锻炼。
【问题讨论】:
标签: swift watchkit apple-watch healthkit