authQuantityWritePermissionsSync(params: Object)
Requires:
HealthKit≥5.18.3@ray-js/ray≥1.6.17
Platforms:
iOS
Description
Request write permission for Quantity data types [iOS only]
Parameters
| Property | Type | Required | Description | HealthKit Since |
|---|---|---|---|---|
permissions | string[] | No | Permission types (used by the API for requesting read/write permissions); see the enum list below for values, e.g., ["1","2"] | v5.18.0 |
readPermissions | string[] | No | Read permission types (used by the API that checks whether the user has already authorized); see the enum list below for values, e.g., ["1","2"] | v5.18.0 |
writePermissions | string[] | No | Write permission types (used by the API that checks whether the user has already authorized); see the enum list below for values, e.g., ["1","2"] | v5.18.0 |
writePermission | number | No | Write permission types (used by the API that checks whether write permission is granted); see the enum list below for values | v5.18.0 |
value | number | No | Value to write (the specific measurement for Quantity or Category data types) | v5.18.0 |
unitType | string | No | Unit to pass in, e.g., "mg/dL", "g", "cm", "count"; required when querying and writing Quantity-type data Refer to Apple's official HKTypeIdentifiers.h file for the unit corresponding to each data type | v5.18.0 |
startTime | number | No | Start time, timestamp in seconds | v5.18.0 |
endTime | number | No | End time, timestamp in seconds | v5.18.0 |
type | number | No | Data types to read/write (used by read/write APIs); see the enum list below for values | v5.18.0 |
Return Value
None
Error Code
| Error Code | Error Message |
|---|---|
1 | AppleHealthParamsError |