1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
//! # Information Property List.
//!
//! A resource containing key-value pairs that identify and configure a bundle.
//!
//! Bundles, which represent executables of different kinds, contain an information
//! property list file. This collection of key-value pairs specifies how the system should
//! interpret the associated bundle. Some key-value pairs characterize the bundle itself,
//! while others configure the app, framework, or other entity that the bundle represents.
//! Some keys are required, while others are specific to particular features of the
//! executable.
//!
//! The information property list file always has the name Info.plist. The file name is
//! case-sensitive and must begin with a capital letter I. Its location within the bundle
//! depends on both the bundle type and the platform. For example, iOS app bundles store
//! the file in the bundle’s root directory, whereas macOS app bundles place the
//! Info.plist file in the Contents directory.
//!
//! To access an information property list, you use an instance of the Bundle class, which
//! represents a bundle on disk. You can get the value for a few common keys by accessing
//! properties of the bundle instance. For example, the bundleIdentifier property contains
//! the value associated with the CFBundleIdentifier key. You can obtain the value for an
//! arbitrary key using the object(forInfoDictionaryKey:) method.
//!
//! Official documentation: https://developer.apple.com/documentation/bundleresources/information_property_list
//!
//! ## Availability
//! * iOS 2.0+
//! * macOS 10.0+
//! * tvOS 9.0+
//! * watchOS 2.0+
//!
//! ## Framework
//! Bundle Resources

pub mod app_execution;
pub mod app_services;
pub mod bundle_configuration;
pub mod data_and_storage;
pub mod kernel_and_drivers;
pub mod protected_resources;
pub mod user_interface;

pub mod prelude {
    pub use super::app_execution::*;
    pub use super::app_services::*;
    pub use super::bundle_configuration::*;
    pub use super::data_and_storage::*;
    pub use super::kernel_and_drivers::*;
    pub use super::protected_resources::*;
    pub use super::user_interface::*;
    pub use super::InfoPlist;
}

use prelude::*;
use serde::{Deserialize, Serialize};

/// Information property list
///
/// https://developer.apple.com/documentation/bundleresources/information_property_list
#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Default)]
pub struct InfoPlist {
    // Bundle Configuration
    #[serde(flatten)]
    pub categorization: Categorization,
    #[serde(flatten)]
    pub identification: Identification,
    #[serde(flatten)]
    pub naming: Naming,
    #[serde(flatten)]
    pub bundle_version: BundleVersion,
    #[serde(flatten)]
    pub operating_system_version: OperatingSystemVersion,
    #[serde(flatten)]
    pub localization: Localization,
    #[serde(flatten)]
    pub help: Help,
    // User Interface
    #[serde(flatten)]
    pub main_user_interface: MainUserInterface,
    #[serde(flatten)]
    pub launch_interface: LaunchInterface,
    #[serde(flatten)]
    pub icons: Icons,
    #[serde(flatten)]
    pub orientation: Orientation,
    #[serde(flatten)]
    pub styling: Styling,
    #[serde(flatten)]
    pub status_bar: StatusBar,
    #[serde(flatten)]
    pub preferences: Preferences,
    #[serde(flatten)]
    pub graphics: Graphics,
    #[serde(flatten)]
    pub quick_look: QuickLook,
    // App Execution
    #[serde(flatten)]
    pub launch: Launch,
    #[serde(flatten)]
    pub launch_conditions: LaunchConditions,
    #[serde(flatten)]
    pub extensions_and_services: ExtensionsAndServices,
    #[serde(flatten)]
    pub app_clips: AppClips,
    #[serde(flatten)]
    pub background_execution: BackgroundExecution,
    #[serde(flatten)]
    pub endpoint_security: EndpointSecurity,
    #[serde(flatten)]
    pub plugin_support: PluginSupport,
    #[serde(flatten)]
    pub plugin_configuration: PluginConfiguration,
    #[serde(flatten)]
    pub termination: Termination,
    // Protected Resources
    #[serde(flatten)]
    pub bluetooth: Bluetooth,
    #[serde(flatten)]
    pub calendar_and_reminders: CalendarAndReminders,
    #[serde(flatten)]
    pub camera_and_microphone: CameraAndMicrophone,
    #[serde(flatten)]
    pub contacts: Contacts,
    #[serde(flatten)]
    pub face_id: FaceId,
    #[serde(flatten)]
    pub files_and_folders: FilesAndFolders,
    #[serde(flatten)]
    pub game_center: GameCenter,
    #[serde(flatten)]
    pub health: Health,
    #[serde(flatten)]
    pub home: Home,
    #[serde(flatten)]
    pub location: Location,
    #[serde(flatten)]
    pub media_player: MediaPlayer,
    #[serde(flatten)]
    pub motion: Motion,
    #[serde(flatten)]
    pub networking: Networking,
    #[serde(flatten)]
    pub nfc: Nfc,
    #[serde(flatten)]
    pub photos: Photos,
    #[serde(flatten)]
    pub scripting: Scripting,
    #[serde(flatten)]
    pub security: Security,
    #[serde(flatten)]
    pub sensors: Sensors,
    #[serde(flatten)]
    pub siri: Siri,
    #[serde(flatten)]
    pub speech: Speech,
    #[serde(flatten)]
    pub tv_resource: TvResource,
    #[serde(flatten)]
    pub wi_fi: WiFi,
    // Data and Storage
    #[serde(flatten)]
    pub documents: Documents,
    #[serde(flatten)]
    pub url_schemes: UrlSchemes,
    #[serde(flatten)]
    pub universal_type_identifiers: UniversalTypeIdentifiers,
    #[serde(flatten)]
    pub network: Network,
    #[serde(flatten)]
    pub storage: Storage,
    #[serde(flatten)]
    pub core_ml_models: CoreMlModels,
    #[serde(flatten)]
    pub java: Java,
    // App Services
    #[serde(flatten)]
    pub carplay: CarPlay,
    #[serde(flatten)]
    pub exposure_notification: ExposureNotification,
    #[serde(flatten)]
    pub pointer_interactions: PointerInteractions,
    #[serde(flatten)]
    pub games: Games,
    #[serde(flatten)]
    pub intents: Intents,
    #[serde(flatten)]
    pub maps: Maps,
    #[serde(flatten)]
    pub nfc_app_services: NfcAppServices,
    #[serde(flatten)]
    pub authentication: Authentication,
    #[serde(flatten)]
    pub external_accessories: ExternalAccessories,
    #[serde(flatten)]
    pub service_management: ServiceManagement,
    #[serde(flatten)]
    pub interprocess_communication: InterprocessCommunication,
    #[serde(flatten)]
    pub store: Store,
    // Kernel and Drivers
    #[serde(flatten)]
    pub driver_personalities: DriverPersonalities,
    #[serde(flatten)]
    pub kext_dependencies: KextDependencies,
    #[serde(flatten)]
    pub thunderbolt_compatibility: ThunderboltCompatibility,
}