apple_bundle/entitlements/icloud.rs
1use serde::{Deserialize, Serialize};
2
3/// iCloud
4#[derive(Serialize, Deserialize, Clone, Default, Debug, PartialEq, Eq)]
5pub struct ICloud {
6 /// The container identifiers for the iCloud development environment.
7 ///
8 /// ## Availability
9 /// * iOS 3.0+
10 /// * macOS 10.7+
11 /// * tvOS 9.0+
12 /// * watchOS 2.0+
13 ///
14 /// ## Framework
15 /// * Foundation
16 #[serde(
17 rename = "com.apple.developer.icloud-container-development-container-identifiers",
18 serialize_with = "crate::serialize_option",
19 skip_serializing_if = "Option::is_none"
20 )]
21 pub icloud_container_development_container_identifiers: Option<Vec<String>>,
22 /// The development or production environment to use for the iCloud containers.
23 ///
24 /// ## Availability
25 /// * iOS 3.0+
26 /// * macOS 10.7+
27 /// * tvOS 9.0+
28 /// * watchOS 2.0+
29 ///
30 /// ## Framework
31 /// * Foundation
32 #[serde(
33 rename = "com.apple.developer.icloud-container-environment",
34 skip_serializing_if = "Option::is_none",
35 serialize_with = "crate::serialize_enum_option"
36 )]
37 pub icloud_container_environment: Option<ICloudContainerEnvironment>,
38 /// The container identifiers for the iCloud production environment.
39 ///
40 /// ## Availability
41 /// * iOS 3.0+
42 /// * macOS 10.7+
43 /// * tvOS 9.0+
44 /// * watchOS 2.0+
45 ///
46 /// ## Framework
47 /// * Foundation
48 #[serde(
49 rename = "com.apple.developer.icloud-container-identifiers",
50 serialize_with = "crate::serialize_option",
51 skip_serializing_if = "Option::is_none"
52 )]
53 pub icloud_container_identifiers: Option<Vec<String>>,
54 /// The iCloud services used by the app.
55 ///
56 /// To add this entitlement to your app, enable the iCloud capability and the iCloud
57 /// Documents or CloudKit service in Xcode.
58 ///
59 /// ## Availability
60 /// * iOS 3.0+
61 /// * macOS 10.7+
62 /// * tvOS 9.0+
63 /// * watchOS 2.0+
64 ///
65 /// ## Framework
66 /// * Foundation
67 #[serde(
68 rename = "com.apple.developer.icloud-services",
69 skip_serializing_if = "Option::is_none",
70 serialize_with = "crate::serialize_vec_enum_option"
71 )]
72 pub icloud_services: Option<Vec<ICloudServices>>,
73 /// The container identifier to use for iCloud key-value storage.
74 ///
75 /// To add this entitlement to your app, enable the iCloud capability and “Key-value
76 /// storage” service in Xcode.
77 ///
78 /// ## Availability
79 /// * iOS 3.0+
80 /// * macOS 10.7+
81 /// * tvOS 9.0+
82 /// * watchOS 2.0+
83 ///
84 /// ## Framework
85 /// * Foundation
86 #[serde(
87 rename = "com.apple.developer.ubiquity-kvstore-identifier",
88 serialize_with = "crate::serialize_option",
89 skip_serializing_if = "Option::is_none"
90 )]
91 pub icloud_key_value_store: Option<String>,
92}
93
94/// iCloud Container Environment
95#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq)]
96pub enum ICloudContainerEnvironment {
97 #[serde(rename = "Development")]
98 Development,
99 #[serde(rename = "Production")]
100 Production,
101}
102
103/// iCloud Services
104#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq)]
105pub enum ICloudServices {
106 #[serde(rename = "CloudDocuments")]
107 CloudDocuments,
108 #[serde(rename = "CloudKit")]
109 CloudKit,
110}