apple_bundle/entitlements/
mod.rs

1//! # Entitlements
2//!
3//! Key-value pairs that grant an executable permission to use a service or technology.
4//!
5//! An entitlement is a right or privilege that grants an executable particular
6//! capabilities. For example, an app needs the HomeKit Entitlement — along with explicit
7//! user consent — to access a user’s home automation network. An app stores
8//! its entitlements as key-value pairs embedded in the code signature of its binary
9//! executable.
10//!
11//! You configure entitlements for your app by declaring capabilities for a target in
12//! Xcode. Xcode records capabilities that you add in a property list file with the
13//! .entitlements extension. You can also edit the entitlements file directly.
14//! When code signing your app, Xcode combines the entitlements file, information from
15//! your developer account, and other project information to apply a final set of
16//! entitlements to your app.
17//!
18//! Official documentation: https://developer.apple.com/documentation/bundleresources/entitlements
19//!
20//! ## Availability
21//! * iOS 2.0+
22//! * macOS 10.7+
23//! * tvOS 9.0+
24//! * watchOS 2.0+
25//!
26//! ## Framework
27//! Bundle Resources
28
29pub mod app_clips;
30pub mod authentication;
31pub mod car_play;
32pub mod contacts;
33pub mod deprecated_entitlements;
34pub mod education;
35pub mod exposure_notification;
36pub mod games;
37pub mod health;
38pub mod home_automation;
39pub mod hypervisor;
40pub mod icloud;
41pub mod networking;
42pub mod push_notifications;
43pub mod security;
44pub mod sensors;
45pub mod siri;
46pub mod system;
47pub mod tv;
48pub mod wallet;
49pub mod wireless_interfaces;
50
51pub mod prelude {
52    pub use super::app_clips::*;
53    pub use super::authentication::*;
54    pub use super::car_play::*;
55    pub use super::contacts::*;
56    pub use super::deprecated_entitlements::*;
57    pub use super::education::*;
58    pub use super::exposure_notification::*;
59    pub use super::games::*;
60    pub use super::health::*;
61    pub use super::home_automation::*;
62    pub use super::hypervisor::*;
63    pub use super::icloud::*;
64    pub use super::networking::*;
65    pub use super::push_notifications::*;
66    pub use super::security::*;
67    pub use super::sensors::*;
68    pub use super::siri::*;
69    pub use super::system::*;
70    pub use super::tv::*;
71    pub use super::wallet::*;
72    pub use super::wireless_interfaces::*;
73    pub use super::Entitlements;
74}
75
76use prelude::*;
77use serde::{Deserialize, Serialize};
78
79/// Entitlements.
80/// https://developer.apple.com/documentation/bundleresources/entitlements
81#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Eq, Default)]
82pub struct Entitlements {
83    /// Authentication
84    #[serde(flatten)]
85    pub authentication: Authentication,
86    /// App Clips
87    #[serde(flatten)]
88    pub app_clips: AppClips,
89    /// Car Play
90    #[serde(flatten)]
91    pub car_play: CarPlay,
92    /// Contacts
93    #[serde(flatten)]
94    pub contacts: Contacts,
95    /// Education
96    #[serde(flatten)]
97    pub education: Education,
98    /// Exposure Notification
99    #[serde(flatten)]
100    pub exposure_notification: ExposureNotification,
101    /// Games
102    #[serde(flatten)]
103    pub games: Games,
104    /// Health
105    #[serde(flatten)]
106    pub health: Health,
107    /// Home Automation
108    #[serde(flatten)]
109    pub home_automation: HomeAutomation,
110    /// Hypervisor
111    #[serde(flatten)]
112    pub hypervisor: Hypervisor,
113    /// iCloud
114    #[serde(flatten)]
115    pub icloud: ICloud,
116    /// Networking
117    #[serde(flatten)]
118    pub networking: Networking,
119    /// Push Notifications
120    #[serde(flatten)]
121    pub push_notifications: PushNotifications,
122    /// Security
123    #[serde(flatten)]
124    pub security: Security,
125    /// Sensors
126    #[serde(flatten)]
127    pub sensors: Sensors,
128    /// Siri
129    #[serde(flatten)]
130    pub siri: Siri,
131    /// System
132    #[serde(flatten)]
133    pub system: System,
134    /// TV
135    #[serde(flatten)]
136    pub tv: Tv,
137    /// Wallet
138    #[serde(flatten)]
139    pub wallet: Wallet,
140    /// Wireless Interfaces
141    #[serde(flatten)]
142    pub wireless_interfaces: WirelessInterfaces,
143    /// Deprecated Entitlements
144    #[serde(flatten)]
145    pub deprecated_entitlements: DeprecatedEntitlements,
146}