
Security News
Crates.io Implements Trusted Publishing Support
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
com.telerik.plugins.healthkit
Advanced tools
![]() | For a quick demo app and easy code samples, check out the plugin page at the Verified Plugins Marketplace: http://plugins.telerik.com/plugin/healthkit |
See the example for how to use these functions.
available
: check if HealthKit is supported (iOS8+, not on iPad)checkAuthStatus
: pass in a type and get back on of undetermined | denied | authorizedrequestAuthorization
: ask some or all permissions up frontreadDateOfBirth
: formatted as yyyy-MM-ddreadGender
: output = male|female|other|unknownreadBloodType
: output = A+|A-|B+|B-|AB+|AB-|O+|O-|unknownreadFitzpatrickSkinType
: output = I|II|III|IV|V|VI|unknownreadWeight
: pass in unit (g=gram, kg=kilogram, oz=ounce, lb=pound, st=stone)saveWeight
: pass in unit (g=gram, kg=kilogram, oz=ounce, lb=pound, st=stone) and amountreadHeight
: pass in unit (mm=millimeter, cm=centimeter, m=meter, in=inch, ft=foot)saveHeight
: pass in unit (mm=millimeter, cm=centimeter, m=meter, in=inch, ft=foot) and amountsaveWorkout
findWorkouts
: no params yet, so this will return all workouts ever of any typequerySampleType
querySampleTypeAggregated
sumQuantityType
monitorSampleType
saveQuantitySample
saveCorrelation
queryCorrelationType
deleteSamples
Read below about CLINICAL_READ_PERMISSION
to use these
queryClinicalSampleType
queryForClinicalRecordsFromSource
queryForClinicalRecordsWithFHIRResourceType
The official Apple documentation for HealthKit can be found here.
For functions that require the unit
attribute, you can find the comprehensive list of possible units from the Apple Developers documentation.
Using the Cordova CLI?
cordova plugin add com.telerik.plugins.healthkit --variable HEALTH_READ_PERMISSION='App needs read access' --variable HEALTH_WRITE_PERMISSION='App needs write access'
HEALTH_READ_PERMISSION
and HEALTH_WRITE_PERMISSION
are shown when your app asks for access to data in HealthKit.
If you would like to read clinical record data from the HealthKit store you will need to provide an extra variable during the plugin install. The CLINICAL_READ_PERMISSION
can be set to include the ability to read FHIR resources. The value that is set here will be used in the NSHealthClinicalHealthRecordsShareUsageDescription
key of your app's info.plist
file. It will be shown when your app asks for clinical record data from HealthKit. Do not include the CLINICAL_READ_PERMISSION
variable unless you really need access to the clinical record data otherwise Apple may reject your app.
The Health Records
capability will be enabled if the CLINICAL_READ_PERMISSION
is provided.
Here is an install example with CLINICAL_READ_PERMISSION
-
cordova plugin add com.telerik.plugins.healthkit --variable HEALTH_READ_PERMISSION='App needs read access' --variable HEALTH_WRITE_PERMISSION='App needs write access' --variable CLINICAL_READ_PERMISSION='App needs read access' --save
<plugin name="com.telerik.plugins.healthkit" source="npm" />
<!-- Read access -->
<config-file platform="ios" parent="NSHealthShareUsageDescription">
<string>App needs read access</string>
</config-file>
<!-- Write access -->
<config-file platform="ios" parent="NSHealthUpdateUsageDescription">
<string>App needs write access</string>
</config-file>
PhoneGap Build has recently migrated from the custom build process to the standard Cordova build process. If you are already running on the new builder, it is no longer necessary to add the variables differently, and the variables must be defined as in the Cordova case.
<platform name="ios">
<plugin name="com.telerik.plugins.healthkit" spec="^0.5.5" >
<variable name="HEALTH_READ_PERMISSION" value="App needs read access" />
<variable name="HEALTH_WRITE_PERMISSION" value="App needs write access" />
</plugin>
</platform>
FAQs
Interact with the iOS HealthKit SDK.
The npm package com.telerik.plugins.healthkit receives a total of 1,087 weekly downloads. As such, com.telerik.plugins.healthkit popularity was classified as popular.
We found that com.telerik.plugins.healthkit demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Research
/Security News
Undocumented protestware found in 28 npm packages disrupts UI for Russian-language users visiting Russian and Belarusian domains.
Research
/Security News
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.