目录
1、配置工程
注意:Team这个地方必须是企业的或者是公司的,不能是Personal Team。如下图
2、设置Capabilities
设置完了之后,左侧会出现 XZHealthDemo.entitlements。如下图:
3、设置 Info.plist
注意:描述语句只能写 "some string value stating the reason",其他的都会崩溃。
Privacy - Health Share Usage Description // 读取权限
some string value stating the reason
Privacy - Health Update Usage Description // 写入权限
some string value stating the reason
或者
<key>NSHealthShareUsageDescription</key>
<string>some string val