apple_bundle/entitlements/health.rs
1use serde::{Deserialize, Serialize};
2
3/// Health
4#[derive(Serialize, Deserialize, Clone, Default, Debug, PartialEq, Eq)]
5pub struct Health {
6 /// A Boolean value that indicates whether the app may request user authorization to
7 /// access health and activity data that appears in the Health app.
8 ///
9 /// To add this entitlement to your app, enable the HealthKit capability in Xcode.
10 ///
11 /// ## Availability
12 /// * iOS 8.0+
13 ///
14 /// ## Framework
15 /// * HealthKit
16 #[serde(
17 rename = "com.apple.developer.healthkit",
18 serialize_with = "crate::serialize_option",
19 skip_serializing_if = "Option::is_none"
20 )]
21 pub healthkit: Option<bool>,
22 /// Health data types that require additional permission.
23 ///
24 /// The HealthKit Entitlement provides access to most HealthKit data types. However,
25 /// because of their highly sensitive nature, some data types require additional
26 /// entitlements. The HealthKit Capabilities Entitlement provides access to these
27 /// data types.
28 ///
29 /// To add this entitlement to your app, first enable the HealthKit capability in
30 /// Xcode, and then check any values that you want to add to the HealthKit
31 /// Capabilities Entitlement.
32 ///
33 /// Only add values for data types that your app needs to access.
34 /// App Review may reject apps that don’t use the data appropriately.
35 /// For more information, see the Health and Health Research section of the App Store
36 /// Review Guidelines.
37 ///
38 /// ## Availability
39 /// * iOS 8.0+
40 ///
41 /// ## Framework
42 /// * HealthKit
43 #[serde(
44 rename = "com.apple.developer.healthkit.access",
45 skip_serializing_if = "Option::is_none",
46 serialize_with = "crate::serialize_vec_enum_option"
47 )]
48 pub healthkit_access: Option<Vec<HealthKitCapabilities>>,
49}
50
51/// Health Kit Capabilities
52#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq)]
53pub enum HealthKitCapabilities {
54 /// The app can request access to FHIR-backed clinical records.
55 #[serde(rename = "health-records")]
56 HealthRecords,
57}