pub struct Health {
    pub healthkit: Option<bool>,
    pub healthkit_access: Option<Vec<HealthKitCapabilities>>,
    pub health_clinical_health_records_share_usage_description: Option<String>,
    pub health_share_usage_description: Option<String>,
    pub health_update_usage_description: Option<String>,
    pub health_required_read_authorization_type_identifiers: Option<Vec<String>>,
}
Expand description

Fields

healthkit: Option<bool>

A Boolean value that indicates whether the app may request user authorization to access health and activity data that appears in the Health app.

To add this entitlement to your app, enable the HealthKit capability in Xcode.

Availability

  • iOS 8.0+

Framework

  • HealthKit
healthkit_access: Option<Vec<HealthKitCapabilities>>

Health data types that require additional permission.

The HealthKit Entitlement provides access to most HealthKit data types. However, because of their highly sensitive nature, some data types require additional entitlements. The HealthKit Capabilities Entitlement provides access to these data types.

To add this entitlement to your app, first enable the HealthKit capability in Xcode, and then check any values that you want to add to the HealthKit Capabilities Entitlement.

Only add values for data types that your app needs to access. App Review may reject apps that don’t use the data appropriately. For more information, see the Health and Health Research section of the App Store Review Guidelines.

Availability

  • iOS 8.0+

Framework

  • HealthKit
health_clinical_health_records_share_usage_description: Option<String>

A message to the user that explains why the app requested permission to read clinical records.

Important

This key is required if your app uses APIs that access the user’s clinical records.

Availability

  • iOS 12.0+

Framework

  • HealthKit
health_share_usage_description: Option<String>

A message to the user that explains why the app requested permission to read samples from the HealthKit store.

Important

This key is required if your app uses APIs that access the user’s heath data.

Availability

  • iOS 8.0+

Framework

  • HealthKit
health_update_usage_description: Option<String>

A message to the user that explains why the app requested permission to save samples to the HealthKit store.

Important

This key is required if your app uses APIs that update the user’s health data.

Availability

  • iOS 8.0+

Framework

  • HealthKit
health_required_read_authorization_type_identifiers: Option<Vec<String>>

The clinical record data types that your app must get permission to read.

Use this key to indicate that your app requires access to specific clinical record data types to function properly. Set the value to an array of strings containing the type identifiers for your required types. For a list of type identifiers, see HKClinicalTypeIdentifier.

To protect the user’s privacy, you must specify three or more required clinical record types. If the user denies authorization to any of the types, authorization fails with an HKError.Code.errorRequiredAuthorizationDenied error. Your app is not told the record types to which the user denied access.

Availability

  • iOS 12.0+

Framework

  • HealthKit

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Deserialize this value from the given Serde deserializer. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Compare self to key and return true if they are equal.

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.