小编Sea*_*ean的帖子

HealthKit HKAuthorizationStatus用于读取数据

我正在使用HealthKit来读取某些类型的信息.我特别不要求写功能.当尝试检测用户是否允许读取某个健康类型时,会出现此问题.

我相信这样做的目的是使用HKHealthStore的authorizationStatusForType方法,但这只是被拒绝或未知.它只返回授权写入类型.有没有人找到一种方法来使用这种方法阅读或另一种​​解决方法?

HKQuantityType *stepsType = [HKQuantityType quantityTypeForIdentifier:HKQuantityTypeIdentifierHeight];
HKAuthorizationStatus status = [self.healthStore authorizationStatusForType:stepsType];
Run Code Online (Sandbox Code Playgroud)

ios ios8 healthkit

16
推荐指数
1
解决办法
3774
查看次数

安装CocoaPods的问题

我想在OSX中设置CocoaPods(我正在运行10.8.2) - 所以我跑了

sudo gem install cocoapods

它成功了,我得到了 - '成功安装了cocoapods-0.17.2 1 gem安装'

然后......我试试pod setup '-bash:pod:command not found'

如何让命令行识别此命令?

ruby macos bash rubygems cocoapods

10
推荐指数
2
解决办法
5500
查看次数

标签 统计

bash ×1

cocoapods ×1

healthkit ×1

ios ×1

ios8 ×1

macos ×1

ruby ×1

rubygems ×1