iOS 12个应用扩展能否写入Healthkit
Can iOS 12 app extension write to Healthkit
首次发布时,docs 声明无法从应用扩展访问 Healthkit:
For example, in iOS 8.0, the HealthKit framework and EventKit UI
framework are unavailable to app extensions.
WatchOS 1 也无法访问 Healthkit,但 使用 WatchOS 2
有谁知道 iOS 的当前版本中是否仍然存在该限制? The name of one API call and 给我希望,但仍不清楚这是否仅适用于 WatchOS 扩展。
找不到任何明确的声明,专门寻找在 intents/Siri 快捷方式功能中的使用。只看写数据,不看读。
至少从 iOS 10.0 和 watchOS 3.0 开始,扩展就可以使用 HealthKit。
我也有类似情况。我的应用程序带有一个小部件。我试图在主应用程序的 swift 文件之一中使用 'import EventKitUI'。现在,如果我选中标记目标成员以包含我的小部件,它将不起作用。我会收到错误消息“Could not build Objective-C module 'EventKitUI'” 删除复选标记后,一切正常。
不知道这背后的原因,但这是我发现的。
首次发布时,docs 声明无法从应用扩展访问 Healthkit:
For example, in iOS 8.0, the HealthKit framework and EventKit UI framework are unavailable to app extensions.
WatchOS 1 也无法访问 Healthkit,但
有谁知道 iOS 的当前版本中是否仍然存在该限制? The name of one API call and
找不到任何明确的声明,专门寻找在 intents/Siri 快捷方式功能中的使用。只看写数据,不看读。
至少从 iOS 10.0 和 watchOS 3.0 开始,扩展就可以使用 HealthKit。
我也有类似情况。我的应用程序带有一个小部件。我试图在主应用程序的 swift 文件之一中使用 'import EventKitUI'。现在,如果我选中标记目标成员以包含我的小部件,它将不起作用。我会收到错误消息“Could not build Objective-C module 'EventKitUI'” 删除复选标记后,一切正常。
不知道这背后的原因,但这是我发现的。