Skip to main content

apple_bundle/info_plist/
mod.rs

1//! # Information Property List.
2//!
3//! A resource containing key-value pairs that identify and configure a bundle.
4//!
5//! Bundles, which represent executables of different kinds, contain an information
6//! property list file. This collection of key-value pairs specifies how the system should
7//! interpret the associated bundle. Some key-value pairs characterize the bundle itself,
8//! while others configure the app, framework, or other entity that the bundle represents.
9//! Some keys are required, while others are specific to particular features of the
10//! executable.
11//!
12//! The information property list file always has the name Info.plist. The file name is
13//! case-sensitive and must begin with a capital letter I. Its location within the bundle
14//! depends on both the bundle type and the platform. For example, iOS app bundles store
15//! the file in the bundle’s root directory, whereas macOS app bundles place the
16//! Info.plist file in the Contents directory.
17//!
18//! To access an information property list, you use an instance of the Bundle class, which
19//! represents a bundle on disk. You can get the value for a few common keys by accessing
20//! properties of the bundle instance. For example, the bundleIdentifier property contains
21//! the value associated with the CFBundleIdentifier key. You can obtain the value for an
22//! arbitrary key using the object(forInfoDictionaryKey:) method.
23//!
24//! Official documentation: <https://developer.apple.com/documentation/bundleresources/information_property_list>
25//!
26//! ## Availability
27//! * iOS 2.0+
28//! * macOS 10.0+
29//! * tvOS 9.0+
30//! * watchOS 2.0+
31//!
32//! ## Framework
33//! Bundle Resources
34
35pub mod app_execution;
36pub mod app_services;
37pub mod bundle_configuration;
38pub mod data_and_storage;
39pub mod kernel_and_drivers;
40pub mod protected_resources;
41pub mod user_interface;
42
43#[allow(ambiguous_glob_reexports)]
44pub mod prelude {
45    pub use super::app_execution::*;
46    pub use super::app_services::*;
47    pub use super::bundle_configuration::*;
48    pub use super::data_and_storage::*;
49    pub use super::kernel_and_drivers::*;
50    pub use super::protected_resources::*;
51    pub use super::user_interface::*;
52    pub use super::InfoPlist;
53}
54
55use prelude::*;
56use serde::{Deserialize, Serialize};
57
58/// Information property list
59///
60/// <https://developer.apple.com/documentation/bundleresources/information_property_list>
61#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Default)]
62pub struct InfoPlist {
63    // Bundle Configuration
64    #[serde(flatten)]
65    pub categorization: Categorization,
66    #[serde(flatten)]
67    pub identification: Identification,
68    #[serde(flatten)]
69    pub naming: Naming,
70    #[serde(flatten)]
71    pub bundle_version: BundleVersion,
72    #[serde(flatten)]
73    pub operating_system_version: OperatingSystemVersion,
74    #[serde(flatten)]
75    pub localization: Localization,
76    #[serde(flatten)]
77    pub help: Help,
78    // User Interface
79    #[serde(flatten)]
80    pub main_user_interface: MainUserInterface,
81    #[serde(flatten)]
82    pub launch_interface: LaunchInterface,
83    #[serde(flatten)]
84    pub icons: Icons,
85    #[serde(flatten)]
86    pub orientation: Orientation,
87    #[serde(flatten)]
88    pub styling: Styling,
89    #[serde(flatten)]
90    pub status_bar: StatusBar,
91    #[serde(flatten)]
92    pub preferences: Preferences,
93    #[serde(flatten)]
94    pub graphics: Graphics,
95    #[serde(flatten)]
96    pub quick_look: QuickLook,
97    // App Execution
98    #[serde(flatten)]
99    pub launch: Launch,
100    #[serde(flatten)]
101    pub launch_conditions: LaunchConditions,
102    #[serde(flatten)]
103    pub extensions_and_services: ExtensionsAndServices,
104    #[serde(flatten)]
105    pub app_clips: AppClips,
106    #[serde(flatten)]
107    pub background_execution: BackgroundExecution,
108    #[serde(flatten)]
109    pub endpoint_security: EndpointSecurity,
110    #[serde(flatten)]
111    pub plugin_support: PluginSupport,
112    #[serde(flatten)]
113    pub plugin_configuration: PluginConfiguration,
114    #[serde(flatten)]
115    pub termination: Termination,
116    // Protected Resources
117    #[serde(flatten)]
118    pub bluetooth: Bluetooth,
119    #[serde(flatten)]
120    pub calendar_and_reminders: CalendarAndReminders,
121    #[serde(flatten)]
122    pub camera_and_microphone: CameraAndMicrophone,
123    #[serde(flatten)]
124    pub contacts: Contacts,
125    #[serde(flatten)]
126    pub face_id: FaceId,
127    #[serde(flatten)]
128    pub files_and_folders: FilesAndFolders,
129    #[serde(flatten)]
130    pub game_center: GameCenter,
131    #[serde(flatten)]
132    pub health: Health,
133    #[serde(flatten)]
134    pub home: Home,
135    #[serde(flatten)]
136    pub location: Location,
137    #[serde(flatten)]
138    pub media_player: MediaPlayer,
139    #[serde(flatten)]
140    pub motion: Motion,
141    #[serde(flatten)]
142    pub networking: Networking,
143    #[serde(flatten)]
144    pub nfc: Nfc,
145    #[serde(flatten)]
146    pub photos: Photos,
147    #[serde(flatten)]
148    pub scripting: Scripting,
149    #[serde(flatten)]
150    pub security: Security,
151    #[serde(flatten)]
152    pub sensors: Sensors,
153    #[serde(flatten)]
154    pub siri: Siri,
155    #[serde(flatten)]
156    pub speech: Speech,
157    #[serde(flatten)]
158    pub tv_resource: TvResource,
159    #[serde(flatten)]
160    pub wi_fi: WiFi,
161    // Data and Storage
162    #[serde(flatten)]
163    pub documents: Documents,
164    #[serde(flatten)]
165    pub url_schemes: UrlSchemes,
166    #[serde(flatten)]
167    pub universal_type_identifiers: UniversalTypeIdentifiers,
168    #[serde(flatten)]
169    pub network: Network,
170    #[serde(flatten)]
171    pub storage: Storage,
172    #[serde(flatten)]
173    pub core_ml_models: CoreMlModels,
174    #[serde(flatten)]
175    pub java: Java,
176    // App Services
177    #[serde(flatten)]
178    pub carplay: CarPlay,
179    #[serde(flatten)]
180    pub exposure_notification: ExposureNotification,
181    #[serde(flatten)]
182    pub pointer_interactions: PointerInteractions,
183    #[serde(flatten)]
184    pub games: Games,
185    #[serde(flatten)]
186    pub intents: Intents,
187    #[serde(flatten)]
188    pub maps: Maps,
189    #[serde(flatten)]
190    pub nfc_app_services: NfcAppServices,
191    #[serde(flatten)]
192    pub authentication: Authentication,
193    #[serde(flatten)]
194    pub external_accessories: ExternalAccessories,
195    #[serde(flatten)]
196    pub service_management: ServiceManagement,
197    #[serde(flatten)]
198    pub interprocess_communication: InterprocessCommunication,
199    #[serde(flatten)]
200    pub store: Store,
201    // Kernel and Drivers
202    #[serde(flatten)]
203    pub driver_personalities: DriverPersonalities,
204    #[serde(flatten)]
205    pub kext_dependencies: KextDependencies,
206    #[serde(flatten)]
207    pub thunderbolt_compatibility: ThunderboltCompatibility,
208}