Latest 1.0.1
Homepage https://github.com/GREENBANYAN/skoal
License MIT
Platforms ios 8.0, requires ARC
Authors

License 
Platform 
Support 
Cocoapods 
Language 
Language 

  Skoal is a healthkit based library that supports reading and writing healthstore properties

Supported Properties

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

skoaluse MIT license

Installation with cocoapods

 pod 'skoal'

screenshot/cocoapods.png

Usage

  • Objective-C
      [[skoal sharedInstance]requestHealthPermissionWithBlock:^(HealthStorePermissionResponse permissionResponse) {
            if (permissionResponse == HealthStorePermissionResponseError) {
                DLog(@"请求权限失败");
            }else{
                DLog(@"请求权限成功");
            }
        }];
  • Swift
             skoal.sharedInstance().requestHealthPermission { (response: HealthStorePermissionResponse) in
                 if response == HealthStorePermissionResponse.error {
                     print("请求失败")
                 } else {
                     print("请求成功")
                }
            }

func preview1 func preview2
screenshot/func1.png screenshot/func2.png

Latest podspec

{
    "name": "skoal",
    "version": "1.0.1",
    "summary": "both read and write function for variety health-related property from your iPhone based on HealthKit",
    "description": "you can use 'skoal' to read or write variety health-related property from your iPhone based on HealthKit.",
    "homepage": "https://github.com/GREENBANYAN/skoal",
    "license": "MIT",
    "authors": {
        "GREENBANYAN": "@[email protected]"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/GREENBANYAN/skoal.git",
        "tag": "1.0.1"
    },
    "source_files": "skoal/*.{h,m}",
    "requires_arc": true
}

Pin It on Pinterest

Share This