使用HealthKit莫名崩溃
今天在测试自己写的框架,[JYAuthorizationManager](www.baidu.com),然后在测试`HealthKit`权限的时候老是莫名的闪退,下面是系统的log:
1
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'NSHealthShareUsageDescription must be set in the app's Info.plist in order to request read authorization for the following types: HKQuantityTypeIdentifierStepCount'
原因指的是plist文件里面没有加权限描述,但其实我已经加过了。于是各种找原因,才发现了解决方法:
> 健康的权限描述里面不能有*中文*。我也是醉了。。。