ios8 - 从另一个应用程序打开 HealthKit 应用程序

标签 ios8 healthkit

我想构建一个健身应用程序,将数据上传到 HealthKit。有没有办法从另一个应用程序打开/导航到 HealthKit?

最佳答案

在 iOS 10 上,健康应用 URL 方案是 x-apple-health .您可以通过调用从您自己的应用程序中打开它:

目标-C:

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"x-apple-health://"]];

swift :
UIApplication.shared.open(URL(string: "x-apple-health://")!)

Open Health app using url scheme | Apple Developer Forums .

关于ios8 - 从另一个应用程序打开 HealthKit 应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25259488/

相关文章:

ios - 如何从 Apple Watch 获取实时健康更新,将其与健康工具包同步并发送到服务器?

ios8 - HealthKit:不允许读取 HKCorrelationType

layout - 为什么在 Collection View 中使用 headerReferenceSize 和自调整单元格会导致 iOS 8 崩溃?

ios8 - iOS8 的 KeychainItemWrapper 崩溃

watchkit - 如何让 HKworkoutsession 始终成为活跃的锻炼类(class)

ios - 应用程序未运行时的 Healthkit 后台交付

ios - UIImage 中的编码字符串返回 null

ios - 弧。数组中的对象指向 nil

Xcode 6.4 显示具有唯一 ID 的重复 'Simulators'

ios - 如何从具有 HKDevice 的健康工具包中查询样本