我想构建一个健身应用程序,将数据上传到 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/