2

我无法访问 HealthStore,“requestAuthorizationToShareTypes”在 Apple Watch 上返回 false。没有弹出设备上的提示。但它适用于模拟器。

这是访问 HealthStore 的代码

    healthStore.requestAuthorizationToShareTypes(nil, readTypes: dataTypes) { (success, error) -> Void in

        if success != true {//returns false
            self.label.setText("not allowed")
        }
    }

我正在使用 xCode 7.0 Beta 3、WatchOS 2 Beta 3

我在 watchOS 2 Beta 3 上有红色 Can't access HealthKit 但问题不同。我在控制台上没有错误。

更新。更新到最新的 Beta 4(xCode、iPhone 应用程序和手表操作系统)后,手表应用程序甚至无法加载。轮子只是在旋转。该应用程序在模拟器中加载。

4

0 回答 0