當我插入數據路由到HKWorkoutRouteBuilder我得到以下錯誤:令人費解的錯誤數據插入HKWorkoutRouteBuilder在watchOS 4 Beta 4的
以服務命名com.apple.healthd.server的連接被中斷,但該消息是通過一個額外的代理髮送,因此這個代理已經失效
這是一段代碼。
workoutRouteBuilder.insertRouteData(filteredLocations) { (success, error) in
if !success {
print("inserting route data failed with error: \(String(describing: error))")
}
}
我通過Speed Sloth示例中的驅動進行了圖案化。
任何見解將不勝感激!
更新: 以下是一些有關手錶日誌的更多信息。看起來像是某種權限問題的,但我一直沒能追查尚未:
fault 13:21:14.664262 -0400 healthd connection from pid 1705: Warning: Exception caught during invocation of received message, dropping incoming message and invalidating the connection. Exception: Invalid parameter not satisfying: [authorizationStatuses count] == [typesIncludingParentTypes count] Invalid parameter not satisfying: [authorizationStatuses count] == [typesIncludingParentTypes count] ( 0 CoreFoundation
0x1dc04d25 + 153 1 libobjc.A.dylib
0x1d227181 objc_exception_throw + 39 2 CoreFoundation
0x1dc04be5 + 1 3 Foundation
0x1e43c1cd + 93 4 HealthDaemon
0x2edf678f + 2015 5 HealthDaemon
0x2ee6eed1 + 143 6 HealthDaemon
0x2ee6ec77 + 143 7 HealthDaemon
0x2ee7b99b + 485 8 HealthDaemon
0x2f0e1e1f + 143 9 Foundation
0x1e589393 + 19 10 Foundation
0x1e587<…>
謝謝!這就是訣竅!我不能相信我錯過了這一點。當然,更具描述性的錯誤信息會很好。 – jeffbailey
同意的錯誤應該改進。此外,當用戶必須授予位置訪問權限才能使其成爲有用的權限時,它似乎需要將權限重載作爲權限。 PS可以隨意將此作爲接受的答案;) – Lewis42