skoal,一款基于HealthKit获取iPhone健康有关的
skoal
skoal,一款基于HealthKit获取iPhone健康有关的属性库,支持读写.
HealthStore 对应支持属性
Sample |
HealthKit Identifier Type |
Read |
Write |
StepCount |
HKQuantityTypeIdentifierStepCount |
✓ |
✓ |
Height |
HKQuantityTypeIdentifierHeight |
✓ |
✓ |
BodyMass |
HKQuantityTypeIdentifierBodyMass |
✓ |
✓ |
|
BodyMassIndex |
HKQuantityTypeIdentifierBodyMassIndex |
✓ |
✓ |
DistanceWalkingRunning |
HKQuantityTypeIdentifierDistanceWalkingRunning |
✓ |
✓ |
FlightsClimbed |
HKQuantityTypeIdentifierFlightsClimbed |
✓ |
✓ |
RespiratoryRate |
HKQuantityTypeIdentifierRespiratoryRate |
✓ |
✓ |
DietaryEnergyConsumed |
HKQuantityTypeIdentifierDietaryEnergyConsumed |
✓ |
✓ |
OxygenSaturation |
HKQuantityTypeIdentifierOxygenSaturation |
✓ |
|
BodyTemperature |
HKQuantityTypeIdentifierBodyTemperature |
✓ |
✓ |
BloodGlucose |
HKQuantityTypeIdentifierBloodGlucose |
✓ |
✓ |
BloodPressureSystolic |
HKQuantityTypeIdentifierBloodPressureSystolic |
✓ |
✓ |
BloodPressureDiastolic |
HKQuantityTypeIdentifierBloodPressureDiastolic |
✓ |
✓ |
StandHour |
HKCategoryTypeIdentifierAppleStandHour |
✓ |
|
BiologicalSex |
biologicalSexWithError |
✓ |
|
DateOfBirth |
dateOfBirthComponentsWithError |
✓ |
|
BloodType |
bloodTypeWithError |
✓ |
|
FitzpatrickSkin |
fitzpatrickSkinTypeWithError |
✓ |
|
SleepAnalysis |
HKCategoryTypeIdentifierSleepAnalysis |
✓ |
|
MenstrualFlow |
HKCategoryTypeIdentifierMenstrualFlow |
✓ |
|
IntermenstrualBleeding |
HKCategoryTypeIdentifierIntermenstrualBleeding |
✓ |
|
SexualActivity |
HKCategoryTypeIdentifierSexualActivity |
✓ |
|
License
skoal
use MIT license
Installation with cocoapods
pod 'skoal'
Usage
[[skoal sharedInstance]requestHealthPermissionWithBlock:^(HealthStorePermissionResponse permissionResponse) {
if (permissionResponse == HealthStorePermissionResponseError) {
DLog(@"请求权限失败");
}else{
DLog(@"请求权限成功");
}
}];
skoal.sharedInstance().requestHealthPermission { (response: HealthStorePermissionResponse) in
if response == HealthStorePermissionResponse.error {
print("请求失败")
} else {
print("请求成功")
}
}
方法预览 |
方法预览 |
方法预览
|
方法预览
] |
本文标题:skoal,一款基于HealthKit获取iPhone健康有关的
本文链接:https://www.haomeiwen.com/subject/cptvvxtx.html
网友评论