mergHK

Typelibrary
DictionaryLCS
LibraryLiveCode Script
Associationsmerghk
Description

mergHK is an iOS HealthKit external for LiveCode. To use this external you must have use a provisioning profile with the HealthKit entitlement enabled. The Entitlements.xcent file in the iOS runtime directories inside the LiveCode app bundle need to me edited to include the com.apple.developer.healthkit entitlement.

TypeNameSummarySyntax
commandmergHKAddQuantitySample

Add a quantity sample

mergHKAddQuantitySample <pIdentifier>, <pStartDate>, <pEndDate>, <pValue>, <pUnits>, [<pWorkoutUUID>], [<pMetadata>]

- - -mergHKAddWorkout

Add a workout

mergHKAddWorkout <pWorkoutType>, <pStartDate>, <pEndDate>, [<pTotalEnergyBurned>], [<pEnergyBurnedUnits>], [<pTotalDistance>], [<pDistanceUnits>], [<pMetadata>]

- - -mergHKRequestAuthorization

Requests permission to save and read the specified data types

mergHKRequestAuthorization <pShareIdentifiers>, <pReadIdentifiers>

- - -mergHKSampleQuery

Query samples between given dates

mergHKSampleQuery <pIdentifier>, <pStartDate>, <pEndDate>, [<pLimit>], [<pSortIdentifier>], [<pSortDirection>]

- - -mergHKStopQuery

Stop a running query

mergHKStopQuery <pQueryID>

functionmergHKBiologicalSex

Reads the user's biological sex setting

mergHKBiologicalSex()

- - -mergHKBloodType

Reads the user's blood type setting

mergHKBloodType()

- - -mergHKCheckAuthorization

Checks the current authorization status for a type identifier

mergHKCheckAuthorization(<pIdentifier>)

- - -mergHKDateOfBirth

Reads the user's date of birth setting

mergHKDateOfBirth()

- - -mergHKFitzpatrickSkinType

Reads the user's skin type based on the Fitzpatrick scale

mergHKFitzpatrickSkinType()

- - -mergHKIsHealthDataAvailable

Check to see if HealthKit is available

mergHKIsHealthDataAvailable()

librarymergHK

mergHKIsHealthDataAvailable()

messagemergHKAuthorizationComplete

Sent to the object that called mergHKRequestAuthorization when the authorization is complete

mergHKAuthorizationComplete <pError>

- - -mergHKQueryResults

Sent to the object that initiated a query

mergHKQueryResults <pQueryID>, <pResultA>, <pError>