apple_bundle/info_plist/app_execution.rs
1//! # App Execution.
2//!
3//! Control app launch, execution, and termination.
4//!
5//! Your app interacts with the system during normal execution by calling system APIs.
6//! However, you need to communicate information about how to execute your app before you
7//! have access to these API calls. For example, you may need to specify under what
8//! conditions your app can launch, the environment that it should launch into,
9//! and what should happen when it terminates. You add keys to your app’s Information
10//! Property List file to manage its execution.
11//!
12//! ## Framework
13//! * Bundle Resources
14
15use serde::{Deserialize, Serialize};
16use std::collections::BTreeMap;
17
18/// Launch
19#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Eq, Default)]
20pub struct Launch {
21 /// The name of the bundle’s main executable class.
22 ///
23 /// The system uses the class identified by this key to set the principalClass
24 /// property of a bundle when it’s loaded.
25 ///
26 /// Xcode sets the default value of this key to NSApplication for macOS apps, and to
27 /// UIApplication for iOS and tvOS apps. For other types of bundles, you must set
28 /// this key in The Info.plist File.
29 ///
30 /// ## Availability
31 /// * macOS 10.0+
32 ///
33 /// ## Framework
34 /// * Foundation
35 #[serde(
36 rename = "NSPrincipalClass",
37 serialize_with = "crate::serialize_option",
38 skip_serializing_if = "Option::is_none"
39 )]
40 pub principal_class: Option<String>,
41 /// The name of the class that implements the complication data source protocol.
42 ///
43 /// Xcode automatically includes this key in the information property list when you
44 /// modify the WatchKit extension’s data source (General > Complication
45 /// Configuration > Data Source class).
46 ///
47 /// ## Availability
48 /// * watchOS 2.0+
49 ///
50 /// ## Framework
51 /// * WatchKit
52 #[serde(
53 rename = "CLKComplicationPrincipalClass",
54 serialize_with = "crate::serialize_option",
55 skip_serializing_if = "Option::is_none"
56 )]
57 pub complication_principal_class: Option<Vec<String>>,
58 /// The name of the bundle’s executable file.
59 ///
60 /// For an app, this key is the executable. For a loadable bundle, it's the binary
61 /// that's loaded dynamically by the bundle. For a framework, it's the shared
62 /// library framework and must have the same name as the framework but without the
63 /// .framework extension.
64 ///
65 /// macOS uses this key to locate the bundle’s executable or shared library in cases
66 /// where the user renames the app or bundle directory.
67 ///
68 /// ## Availability
69 /// * iOS 2.0+
70 /// * macOS 10.0+
71 /// * tvOS 9.0+
72 /// * watchOS 2.0+
73 ///
74 /// ## Framework
75 /// * Core Foundation
76 #[serde(
77 rename = "CFBundleExecutable",
78 serialize_with = "crate::serialize_option",
79 skip_serializing_if = "Option::is_none"
80 )]
81 pub bundle_executable: Option<String>,
82 /// Environment variables to set before launching the app.
83 ///
84 /// ## Availability
85 /// * macOS 10.0+
86 ///
87 /// ## Framework
88 /// * Core Services
89 #[serde(
90 rename = "LSEnvironment",
91 serialize_with = "crate::serialize_option",
92 skip_serializing_if = "Option::is_none"
93 )]
94 pub environment: Option<DefaultDictionary>,
95 /// Application shortcut items.
96 ///
97 /// ## Availability
98 /// * iOS 9.0+
99 ///
100 /// ## Framework
101 /// * UIKit
102 #[serde(
103 rename = "UIApplicationShortcutItems",
104 serialize_with = "crate::serialize_option",
105 skip_serializing_if = "Option::is_none"
106 )]
107 pub application_shortcut_items: Option<Vec<ApplicationShortcutItem>>,
108}
109
110/// Application Shortcut Item
111#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Eq, Default)]
112pub struct ApplicationShortcutItem {
113 #[serde(
114 rename = "UIApplicationShortcutItemIconFile",
115 serialize_with = "crate::serialize_option",
116 skip_serializing_if = "Option::is_none"
117 )]
118 pub icon_file: Option<String>,
119 #[serde(
120 rename = "UIApplicationShortcutItemIconSymbolName",
121 serialize_with = "crate::serialize_option",
122 skip_serializing_if = "Option::is_none"
123 )]
124 pub symbol_name: Option<String>,
125 #[serde(
126 rename = "UIApplicationShortcutItemIconType",
127 serialize_with = "crate::serialize_option",
128 skip_serializing_if = "Option::is_none"
129 )]
130 pub icon_type: Option<String>,
131 #[serde(
132 rename = "UIApplicationShortcutItemSubtitle",
133 serialize_with = "crate::serialize_option",
134 skip_serializing_if = "Option::is_none"
135 )]
136 pub subtitle: Option<String>,
137 #[serde(rename = "UIApplicationShortcutItemTitle")]
138 pub title: String,
139 #[serde(rename = "UIApplicationShortcutItemType")]
140 pub item_type: String,
141 #[serde(
142 rename = "UIApplicationShortcutItemUserInfo",
143 serialize_with = "crate::serialize_option",
144 skip_serializing_if = "Option::is_none"
145 )]
146 pub user_info: Option<BTreeMap<String, String>>,
147}
148
149/// Launch Conditions
150#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Eq, Default)]
151pub struct LaunchConditions {
152 /// The device-related features that your app requires to run.
153 ///
154 /// The App Store prevents customers from installing an app on a device that doesn’t
155 /// support the required capabilities for that app. Use this key to declare the
156 /// capabilities your app requires. For a list of the features that different
157 /// devices support, see Required Device Capabilities.
158 ///
159 /// You typically use an array for the key’s associated value. The presence in that
160 /// array of any of the above possible values indicates that the app requires the
161 /// corresponding feature. Omit a value to indicate that the app doesn’t require
162 /// the feature, but it can be present.
163 ///
164 /// Alternatively, you can use a dictionary as the associated value for the
165 /// UIRequiredDeviceCapabilities key. In that case, use the values above as the
166 /// dictionary’s keys, each with an associated Boolean value. Set the value to true to
167 /// require the corresponding feature. Set the value to false to indicate that the
168 /// feature must not be present on the device. Omit the feature from the
169 /// dictionary to indicate that your app neither requires nor disallows it.
170 ///
171 /// Specify only the features that your app absolutely requires. If your app can
172 /// accommodate missing features by avoiding the code paths that use those
173 /// features, don’t include the corresponding key.
174 ///
175 /// ## Availability
176 /// * iOS 3.0+
177 /// * tvOS 9.0+
178 /// * watchOS 2.0+
179 ///
180 /// ## Framework
181 /// * UIKit
182 #[serde(
183 rename = "UIRequiredDeviceCapabilities",
184 skip_serializing_if = "Option::is_none",
185 serialize_with = "crate::serialize_vec_enum_option"
186 )]
187 pub required_device_capabilities: Option<Vec<DeviceCapabilities>>,
188 /// A Boolean value indicating whether more than one user can launch the app
189 /// simultaneously.
190 ///
191 /// ## Availability
192 /// * macOS 10.0+
193 ///
194 /// ## Framework
195 /// * Core Services
196 #[serde(
197 rename = "LSMultipleInstancesProhibited",
198 serialize_with = "crate::serialize_option",
199 skip_serializing_if = "Option::is_none"
200 )]
201 pub multiple_instances_prohibited: Option<bool>,
202 /// An array of the architectures that the app supports, arranged according to their
203 /// preferred usage.
204 ///
205 /// Use this key to prioritize the execution of a specific architecture in a universal
206 /// binary. This key contains an array of strings, with each string specifying the
207 /// name of a supported architecture. The order of the strings in the array
208 /// represents your preference for executing the app. For example, if you specify the
209 /// x86_64 architecture first for a universal app, the system runs that app under
210 /// Rosetta translation on Apple silicon. For more information about
211 /// Rosetta translation, see About the Rosetta Translation Environment.
212 ///
213 /// ## Availability
214 /// * macOS 10.1+
215 ///
216 /// ## Framework
217 /// * Core Services
218 #[serde(
219 rename = "LSArchitecturePriority",
220 skip_serializing_if = "Option::is_none",
221 serialize_with = "crate::serialize_enum_option"
222 )]
223 pub architecture_priority: Option<ArchitecturePriority>,
224 /// A Boolean value that indicates whether to require the execution of the app’s
225 /// native architecture when multiple architectures are available.
226 ///
227 /// When an app supports multiple architectures, the presence of this key causes the
228 /// system to choose the native architecture over ones that require translation.
229 /// For example, this key prevents the system from using the Rosetta translation
230 /// process to execute the Intel portion of a universal app on Apple silicon.
231 ///
232 /// ## Availability
233 /// * macOS 10.0+
234 ///
235 /// ## Framework
236 /// * Core Services
237 #[serde(
238 rename = "LSRequiresNativeExecution",
239 serialize_with = "crate::serialize_option",
240 skip_serializing_if = "Option::is_none"
241 )]
242 pub requires_native_execution: Option<bool>,
243 /// A Boolean value indicating whether the user can install and run the watchOS app
244 /// independently of its iOS companion app.
245 ///
246 /// Xcode automatically includes this key in the WatchKit extension’s information
247 /// property list and sets its value to true when you create a project using the
248 /// iOS App with Watch App template. When you set the value of this key to true, the
249 /// app doesn’t need its iOS companion app to operate properly. Users can choose
250 /// to install the iOS app, the watchOS app, or both.
251 ///
252 /// ## Availability
253 /// * watchOS 6.0+
254 ///
255 /// ## Framework
256 /// * WatchKit
257 #[serde(
258 rename = "WKRunsIndependentlyOfCompanionApp",
259 serialize_with = "crate::serialize_option",
260 skip_serializing_if = "Option::is_none"
261 )]
262 pub runs_independently_of_companion_app: Option<bool>,
263 /// A Boolean value indicating whether the app is a watch-only app.
264 ///
265 /// Xcode automatically includes this key in the WatchKit extension’s information
266 /// property list and sets its value to true when you create a project using the
267 /// Watch App template. When you set the value of this key to true, the app is only
268 /// available on Apple Watch, with no related iOS app.
269 ///
270 /// ## Availability
271 /// * watchOS 6.0+
272 ///
273 /// ## Framework
274 /// * WatchKit
275 #[serde(
276 rename = "WKWatchOnly",
277 serialize_with = "crate::serialize_option",
278 skip_serializing_if = "Option::is_none"
279 )]
280 pub watch_only: Option<bool>,
281 /// A Boolean value that indicates whether a watchOS app should opt out of
282 /// automatically launching when its companion iOS app starts playing audio
283 /// content.
284 ///
285 /// If your watchOS app does not act as a remote control for the iOS app, set this key
286 /// to true in your WatchKit extension’s information property list.
287 ///
288 /// ## Availability
289 /// * watchOS 5.0+
290 ///
291 /// ## Framework
292 /// * WatchKit
293 #[serde(
294 rename = "PUICAutoLaunchAudioOptOut",
295 serialize_with = "crate::serialize_option",
296 skip_serializing_if = "Option::is_none"
297 )]
298 pub auto_launch_audio_opt_out: Option<bool>,
299 /// The complication families that the app can provide data for.
300 ///
301 /// To add this key to the information property list, enable the desired families in
302 /// the WatchKit extension’s Complication Configuration settings.
303 #[deprecated(
304 since = "watchOS 2.0-7.0",
305 note = "In watchOS 7 and later, use getComplicationDescriptors(handler:) to define the supported complication families."
306 )]
307 #[serde(
308 rename = "CLKComplicationSupportedFamilies",
309 skip_serializing_if = "Option::is_none",
310 serialize_with = "crate::serialize_vec_enum_option"
311 )]
312 pub complication_supported_families: Option<Vec<ComplicationSupportedFamilies>>,
313}
314
315/// Extensions and Services
316#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Default)]
317pub struct ExtensionsAndServices {
318 /// The properties of an app extension.
319 ///
320 /// ## Availability
321 /// * iOS 8.0+
322 /// * macOS 10.10+
323 ///
324 /// ## Framework
325 /// * Foundation
326 #[serde(
327 rename = "NSExtension",
328 serialize_with = "crate::serialize_option",
329 skip_serializing_if = "Option::is_none"
330 )]
331 pub extension: Option<Extension>,
332 /// The services provided by an app.
333 ///
334 /// ## Availability
335 /// * macOS 10.0+
336 ///
337 /// ## Framework
338 /// * AppKit
339 #[serde(
340 rename = "NSServices",
341 serialize_with = "crate::serialize_option",
342 skip_serializing_if = "Option::is_none"
343 )]
344 pub services: Option<Vec<Service>>,
345 /// The name of your watchOS app’s extension delegate.
346 ///
347 /// This key provides the name of a class that adopts the WKExtensionDelegate
348 /// protocol. Xcode automatically includes this key in the WatchKit extension’s
349 /// information property list when you create a watchOS project from a template.
350 /// You only modify this value when you rename or replace the extension delegate.
351 ///
352 /// ## Availability
353 /// * watchOS 2.0+
354 ///
355 /// ## Framework
356 /// * WatchKit
357 #[serde(
358 rename = "WKExtensionDelegateClassName",
359 serialize_with = "crate::serialize_option",
360 skip_serializing_if = "Option::is_none"
361 )]
362 pub extension_delegate_class_name: Option<String>,
363 /// The bundle ID of the widget that's available as a Home screen quick action in apps
364 /// that have more than one widget.
365 ///
366 /// ## Availability
367 /// * iOS 10.0+
368 /// * tvOS 9.0+
369 /// * watchOS 2.0+
370 ///
371 /// ## Framework
372 /// * UIKit
373 #[serde(
374 rename = "UIApplicationShortcutWidget",
375 serialize_with = "crate::serialize_option",
376 skip_serializing_if = "Option::is_none"
377 )]
378 pub application_shortcut_widget: Option<String>,
379}
380
381/// App Clips
382#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Eq, Default)]
383pub struct AppClips {
384 /// A collection of keys that an App Clip uses to get additional capabilities.
385 ///
386 /// ## Availability
387 /// * iOS 14.0+
388 ///
389 /// ## Framework
390 /// * App Clip
391 #[serde(
392 rename = "NSAppClip",
393 serialize_with = "crate::serialize_option",
394 skip_serializing_if = "Option::is_none"
395 )]
396 pub app_clip: Option<AppClip>,
397}
398
399/// Background Execution
400#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Eq, Default)]
401pub struct BackgroundExecution {
402 /// Services provided by an app that require it to run in the background.
403 ///
404 /// ## Availability
405 /// * iOS 4.0+
406 /// * watchOS 4.0+
407 ///
408 /// ## Framework
409 /// * UIKit
410 #[serde(
411 rename = "UIBackgroundModes",
412 skip_serializing_if = "Option::is_none",
413 serialize_with = "crate::serialize_vec_enum_option"
414 )]
415 pub ui_background_modes: Option<Vec<UiBackgroundMode>>,
416 /// Specifies the underlying hardware type on which this app is designed to run.
417 ///
418 /// ### Important
419 /// Do not insert this key manually into your Info.plist files. Xcode inserts
420 /// it automatically based on the value in the Targeted Device Family build setting.
421 /// You should use that build setting to change the value of the key.
422 ///
423 /// The value of this key is usually an integer but it can also be an array of
424 /// integers. Table 4 lists the possible integer values you can use and the
425 /// corresponding devices.
426 ///
427 /// ### Values for the UIDeviceFamily key:
428 /// 1 (Default) The app runs on iPhone and iPod touch devices.
429 /// 2 The app runs on iPad devices.
430 ///
431 /// ## Availability
432 /// * iOS 3.2+
433 ///
434 /// ## Framework
435 /// * UIKit
436 #[serde(
437 rename(serialize = "UIDeviceFamily"),
438 serialize_with = "crate::serialize_option",
439 skip_serializing_if = "Option::is_none"
440 )]
441 pub ui_device_family: Option<Vec<u8>>,
442 /// The services a watchOS app provides that require it to continue running in the
443 /// background.
444 ///
445 /// You can only enable one of the extended runtime session modes (self-care,
446 /// mindfulness, physical-therapy, or alarm). However, you can enable both an
447 /// extended runtime session mode and the workout-processing mode. If you set the
448 /// background modes using Xcode’s Signing & Capabilities tab, Xcode insures that
449 /// these values are set properly.
450 ///
451 /// ## Availability
452 /// * watchOS 3.0+
453 ///
454 /// ## Framework
455 /// * WatchKit
456 #[serde(
457 rename = "WKBackgroundModes",
458 skip_serializing_if = "Option::is_none",
459 serialize_with = "crate::serialize_vec_enum_option"
460 )]
461 pub wk_background_modes: Option<Vec<WkBackgroundMode>>,
462 /// An array of strings containing developer-specified task identifiers in reverse URL
463 /// notation.
464 ///
465 /// ## Availability
466 /// * iOS 13.0+
467 /// * tvOS 13.0+
468 ///
469 /// ## Framework
470 /// * Background Tasks
471 #[serde(
472 rename = "BGTaskSchedulerPermittedIdentifiers",
473 serialize_with = "crate::serialize_option",
474 skip_serializing_if = "Option::is_none"
475 )]
476 pub task_scheduler_permitted_identifiers: Option<Vec<String>>,
477 /// A Boolean value indicating whether the app runs only in the background.
478 ///
479 /// ## Availability
480 /// * macOS 10.0+
481 ///
482 /// ## Framework
483 /// * Core Services
484 #[serde(
485 rename = "LSBackgroundOnly",
486 serialize_with = "crate::serialize_option",
487 skip_serializing_if = "Option::is_none"
488 )]
489 pub background_only: Option<bool>,
490}
491
492/// Endpoint Security
493#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Eq, Default)]
494pub struct EndpointSecurity {
495 ///
496 /// ## Availability
497 /// * macOS 10.15+
498 ///
499 /// ## Framework
500 /// * Endpoint Security
501 #[serde(
502 rename = "NSEndpointSecurityEarlyBoot",
503 serialize_with = "crate::serialize_option",
504 skip_serializing_if = "Option::is_none"
505 )]
506 pub endpoint_security_early_boot: Option<bool>,
507 ///
508 /// ## Availability
509 /// * macOS 10.15+
510 ///
511 /// ## Framework
512 /// * Endpoint Security
513 #[serde(
514 rename = "NSEndpointSecurityRebootRequired",
515 serialize_with = "crate::serialize_option",
516 skip_serializing_if = "Option::is_none"
517 )]
518 pub endpoint_security_reboot_required: Option<bool>,
519}
520
521/// Plugin Support
522#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Eq, Default)]
523pub struct PluginSupport {
524 /// The name of the app's plugin bundle.
525 ///
526 /// ## Availability
527 /// * macOS 10.0+
528 ///
529 /// ## Framework
530 /// * AppKit
531 #[serde(
532 rename = "NSDockTilePlugIn",
533 serialize_with = "crate::serialize_option",
534 skip_serializing_if = "Option::is_none"
535 )]
536 pub dock_tile_plugin: Option<String>,
537}
538
539/// Plugin Configuration
540#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Eq, Default)]
541pub struct PluginConfiguration {
542 /// The function to use when dynamically registering a plugin.
543 ///
544 /// ## Availability
545 /// * macOS 10.0+
546 ///
547 /// ## Framework
548 /// * Core Foundation
549 #[serde(
550 rename = "CFPlugInDynamicRegisterFunction",
551 serialize_with = "crate::serialize_option",
552 skip_serializing_if = "Option::is_none"
553 )]
554 pub plugin_dynamic_register_function: Option<String>,
555 /// A Boolean value indicating whether the host loads this plugin.
556 ///
557 /// ## Availability
558 /// * macOS 10.0+
559 ///
560 /// ## Framework
561 /// * Core Foundation
562 #[serde(
563 rename = "CFPlugInDynamicRegistration",
564 serialize_with = "crate::serialize_option",
565 skip_serializing_if = "Option::is_none"
566 )]
567 pub plugin_dynamic_registration: Option<bool>,
568 /// The interfaces supported by the plugin for static registration.
569 ///
570 /// ## Availability
571 /// * macOS 10.0+
572 ///
573 /// ## Framework
574 /// * Core Foundation
575 #[serde(
576 rename = "CFPlugInFactories",
577 serialize_with = "crate::serialize_option",
578 skip_serializing_if = "Option::is_none"
579 )]
580 pub plugin_factories: Option<BTreeMap<String, String>>,
581 /// One or more groups of interfaces supported by the plugin for static registration.
582 ///
583 /// ## Availability
584 /// * macOS 10.0+
585 ///
586 /// ## Framework
587 /// * Core Foundation
588 #[serde(
589 rename = "CFPlugInTypes",
590 serialize_with = "crate::serialize_option",
591 skip_serializing_if = "Option::is_none"
592 )]
593 pub plugin_types: Option<BTreeMap<String, String>>,
594 /// The name of the function to call to unload the plugin code from memory.
595 ///
596 /// ## Availability
597 /// * macOS 10.0+
598 ///
599 /// ## Framework
600 /// * Core Foundation
601 #[serde(
602 rename = "CFPlugInUnloadFunction",
603 serialize_with = "crate::serialize_option",
604 skip_serializing_if = "Option::is_none"
605 )]
606 pub plugin_unload_function: Option<String>,
607}
608
609/// Termination
610#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Eq, Default)]
611pub struct Termination {
612 /// A Boolean value indicating whether the app is notified when a child process dies.
613 ///
614 /// ## Availability
615 /// * macOS 10.0+
616 ///
617 /// ## Framework
618 /// * Core Foundation
619 #[serde(
620 rename = "LSGetAppDiedEvents",
621 serialize_with = "crate::serialize_option",
622 skip_serializing_if = "Option::is_none"
623 )]
624 pub get_app_died_events: Option<bool>,
625 /// A Boolean value indicating whether the system may terminate the app to log out or
626 /// shut down more quickly.
627 ///
628 /// ## Availability
629 /// * macOS 10.0+
630 ///
631 /// ## Framework
632 /// * AppKit
633 #[serde(
634 rename = "NSSupportsSuddenTermination",
635 serialize_with = "crate::serialize_option",
636 skip_serializing_if = "Option::is_none"
637 )]
638 pub supports_sudden_termination: Option<bool>,
639 /// Deprecated: A Boolean value indicating whether the app terminates, rather than
640 /// moves to the background, when the app quits.
641 ///
642 /// ## Availability
643 /// * iOS 4.0–13.0
644 /// * tvOS 9.0–13.0
645 /// * watchOS 2.0–6.0
646 ///
647 /// ## Framework
648 /// * UIKit
649 #[deprecated(
650 since = "iOS 4.0-13.0, tvOS 9.0-13.0, watchOS 2.0-6.0",
651 note = "The system now automatically suspends apps leaving the foreground when they don't require background execution.
652 For more information, see About the Background Execution Sequence."
653 )]
654 #[serde(
655 rename = "UIApplicationExitsOnSuspend",
656 serialize_with = "crate::serialize_option",
657 skip_serializing_if = "Option::is_none"
658 )]
659 pub application_exits_on_suspend: Option<bool>,
660}
661
662/// WK Background Mode
663#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Eq)]
664pub enum WkBackgroundMode {
665 /// Allows an active workout session to run in the background.
666 #[serde(rename = "workout-processing")]
667 WorkoutProcessing,
668 /// Enables extended runtime sessions for brief activities focusing on health or
669 /// emotional well-being.
670 #[serde(rename = "self-care")]
671 SelfCare,
672 /// Enables extended runtime sessions for silent meditation.
673 #[serde(rename = "mindfulness")]
674 Mindfulness,
675 /// Enables extended runtime sessions for stretching, strengthening, or
676 /// range-of-motion exercises.
677 #[serde(rename = "physical-therapy")]
678 PhysicalTherapy,
679 /// Enables extended runtime sessions for smart alarms.
680 #[serde(rename = "alarm")]
681 Alarm,
682}
683
684/// UI Background Mode
685#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Eq)]
686pub enum UiBackgroundMode {
687 #[serde(rename = "audio")]
688 Audio,
689 #[serde(rename = "location")]
690 Location,
691 #[serde(rename = "voip")]
692 Voip,
693 #[serde(rename = "external-accessory")]
694 ExternalAccessory,
695 #[serde(rename = "bluetooth-central")]
696 BluetoothCentral,
697 #[serde(rename = "bluetooth-peripheral")]
698 BluetoothPeripheral,
699 #[serde(rename = "fetch")]
700 Fetch,
701 #[serde(rename = "remote-notification")]
702 RemoteNotification,
703 #[serde(rename = "processing")]
704 Processing,
705}
706
707/// App Clip
708#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Eq, Default)]
709pub struct AppClip {
710 /// A Boolean value that indicates whether an App Clip can schedule or receive
711 /// notifications for a limited amount of time.
712 ///
713 /// Set the corresponding value to true to enable your App Clip to schedule or receive
714 /// notifications for up to 8 hours after each launch. For more information, see
715 /// Enabling Notifications in App Clips.
716 ///
717 /// ## Availability
718 /// * iOS 14.0+
719 ///
720 /// ## Framework
721 /// * App Clip
722 #[serde(
723 rename = "NSAppClipRequestEphemeralUserNotification",
724 serialize_with = "crate::serialize_option",
725 skip_serializing_if = "Option::is_none"
726 )]
727 pub request_ephemeral_user_notification: Option<bool>,
728 /// A Boolean value that indicates whether an App Clip can confirm the user’s
729 /// location.
730 ///
731 /// Set the value to true to allow your App Clip to confirm the user’s location. For
732 /// more information, see Responding to Invocations.
733 ///
734 /// ## Availability
735 /// * iOS 14.0+
736 ///
737 /// ## Framework
738 /// * App Clip
739 #[serde(
740 rename = "NSAppClipRequestLocationConfirmation",
741 serialize_with = "crate::serialize_option",
742 skip_serializing_if = "Option::is_none"
743 )]
744 pub request_location_confirmation: Option<bool>,
745}
746
747/// Extension
748#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Default)]
749pub struct Extension {
750 /// The names of the intents that an extension supports.
751 ///
752 /// ## Availability
753 /// * iOS 10.0+
754 ///
755 /// ## Framework
756 /// * Foundation
757 #[serde(
758 rename = "IntentsSupported",
759 serialize_with = "crate::serialize_option",
760 skip_serializing_if = "Option::is_none"
761 )]
762 pub intents_supported: Option<Vec<String>>,
763 /// A dictionary that specifies the minimum size of the floating window in which Final
764 /// Cut Pro hosts the extension view.
765 ///
766 /// ## Availability
767 /// * ProVideo Workflow Extensions 1.0+
768 ///
769 /// ## Framework
770 /// * ProExtension
771 #[serde(
772 rename = "ProExtensionAttributes",
773 serialize_with = "crate::serialize_option",
774 skip_serializing_if = "Option::is_none"
775 )]
776 pub pro_extension_attributes: Option<BTreeMap<String, String>>,
777 /// The name of the class with the principal implementation of your extension.
778 ///
779 /// The Compressor app instantiates the class specified in the
780 /// ProExtensionPrincipalClass key to convert source files to the output format
781 /// your extension supports.
782 ///
783 /// ## Availability
784 /// * ProVideo Workflow Extensions 1.0+
785 /// * ProVideo Encoder Extensions 1.0+
786 ///
787 /// ## Framework
788 /// * ProExtension
789 #[serde(
790 rename = "ProExtensionPrincipalClass",
791 serialize_with = "crate::serialize_option",
792 skip_serializing_if = "Option::is_none"
793 )]
794 pub pro_extension_principal_class: Option<String>,
795 /// The name of the principal view controller class of your extension.
796 ///
797 /// This key provides the name of the primary view controller class of your extension
798 /// that adopts the NSViewController protocol. When you create an extension, the
799 /// Xcode template automatically includes this key in the workflow extension
800 /// information property list. You only modify the value of this key when you rename
801 /// the primary view controller class in your extension.
802 ///
803 /// ## Availability
804 /// * ProVideo Workflow Extensions 1.0+
805 /// * ProVideo Encoder Extensions 1.0+
806 ///
807 /// ## Framework
808 /// * ProExtension
809 #[serde(
810 rename = "ProExtensionPrincipalViewControllerClass",
811 serialize_with = "crate::serialize_option",
812 skip_serializing_if = "Option::is_none"
813 )]
814 pub pro_extension_principal_view_controller_class: Option<String>,
815 /// A UUID string that uniquely identifies your extension to the Compressor app.
816 ///
817 /// The value for this key is a placeholder UUID the Xcode template generates. Each
818 /// extension must have a unique UUID. When you build an extension for the first
819 /// time, the build script in the Xcode template replaces the placeholder UUID
820 /// with a new UUID. The new UUID fulfills the uniqueness and persistence requirement
821 /// for ProExtensionUUID. For subsequent rebuilds, the UUID stays the same because
822 /// the Compressor app uses this UUID to differentiate between previously
823 /// saved and newly discovered extensions.
824 ///
825 /// ## Availability
826 /// * ProVideo Workflow Extensions 1.0+
827 /// * ProVideo Encoder Extensions 1.0+
828 ///
829 /// ## Framework
830 /// * ProExtension
831 #[serde(
832 rename = "ProExtensionUUID",
833 serialize_with = "crate::serialize_option",
834 skip_serializing_if = "Option::is_none"
835 )]
836 pub pro_extension_uuid: Option<String>,
837 /// Account Authentication Modification. The rules the system satisfies when
838 /// generating a strong password for your extension during an automatic upgrade.
839 ///
840 /// ## Availability
841 /// * iOS 14.0+
842 ///
843 /// ## Framework
844 /// * Foundation
845 #[serde(
846 rename = "ASAccountAuthenticationModificationPasswordGenerationRequirements",
847 serialize_with = "crate::serialize_option",
848 skip_serializing_if = "Option::is_none"
849 )]
850 pub password_generation_requirements: Option<String>,
851 /// Account Authentication Modification. A Boolean value that indicates whether the
852 /// extension supports upgrading a user’s password to a strong password.
853 ///
854 /// ## Availability
855 /// * iOS 14.0+
856 ///
857 /// ## Framework
858 /// * Foundation
859 #[serde(
860 rename = "ASAccountAuthenticationModificationSupportsStrongPasswordUpgrade",
861 serialize_with = "crate::serialize_option",
862 skip_serializing_if = "Option::is_none"
863 )]
864 pub supports_strong_password_upgrade: Option<bool>,
865 /// Account Authentication Modification. A Boolean value that indicates whether the
866 /// extension supports upgrading from using password authentication to using Sign
867 /// in with Apple.
868 ///
869 /// ## Availability
870 /// * iOS 14.0+
871 ///
872 /// ## Framework
873 /// * Foundation
874 #[serde(
875 rename = "ASAccountAuthenticationModificationSupportsUpgradeToSignInWithApple",
876 serialize_with = "crate::serialize_option",
877 skip_serializing_if = "Option::is_none"
878 )]
879 pub supports_upgrade_to_sign_in_with_apple: Option<bool>,
880 /// A Boolean value indicating whether the Action extension is presented in full
881 /// screen.
882 ///
883 /// ## Availability
884 /// * iOS 8.0+
885 ///
886 /// ## Framework
887 /// * Foundation
888 #[serde(
889 rename = "NSExtensionActionWantsFullScreenPresentation",
890 serialize_with = "crate::serialize_option",
891 skip_serializing_if = "Option::is_none"
892 )]
893 pub extension_action_wants_full_screen_presentation: Option<bool>,
894 /// Properties of an app extension.
895 ///
896 /// ## Availability
897 /// * iOS 8.0+
898 /// * macOS 10.10+
899 ///
900 /// ## Framework
901 /// * Foundation
902 #[serde(
903 rename = "NSExtensionAttributes",
904 serialize_with = "crate::serialize_option",
905 skip_serializing_if = "Option::is_none"
906 )]
907 pub extension_attributes: Option<ExtensionAttributes>,
908 /// The name of the app extension’s main storyboard file.
909 ///
910 /// This key is mutually exclusive with NSExtensionPrincipalClass. Typically, Xcode
911 /// sets the value of this key when creating an App Extension target in your
912 /// project. If you change the name of your storyboard file, remember to update the
913 /// value of this key.
914 ///
915 /// ## Availability
916 /// * iOS 8.0+
917 /// * macOS 10.10+
918 ///
919 /// ## Framework
920 /// * Foundation
921 #[serde(
922 rename = "NSExtensionMainStoryboard",
923 serialize_with = "crate::serialize_option",
924 skip_serializing_if = "Option::is_none"
925 )]
926 pub extension_main_storyboard: Option<String>,
927 /// A Boolean value indicating whether the app extension ignores appearance changes
928 /// made by the host app.
929 ///
930 /// ## Availability
931 /// * iOS 10.0+
932 ///
933 /// ## Framework
934 /// * Foundation
935 #[serde(
936 rename = "NSExtensionOverridesHostUIAppearance",
937 serialize_with = "crate::serialize_option",
938 skip_serializing_if = "Option::is_none"
939 )]
940 pub extension_overrides_host_ui_appearance: Option<bool>,
941 /// The extension point that supports an app extension.
942 ///
943 /// ## Availability
944 /// * iOS 8.0+
945 /// * macOS 10.10+
946 ///
947 /// ## Framework
948 /// * Foundation
949 #[serde(
950 rename = "NSExtensionPointIdentifier",
951 skip_serializing_if = "Option::is_none",
952 serialize_with = "crate::serialize_enum_option"
953 )]
954 pub extension_point_identifier: Option<ExtensionPointIdentifier>,
955 /// The custom class that implements an app extension’s primary view or functionality.
956 ///
957 /// This key is mutually exclusive with NSExtensionMainStoryboard. Typically, Xcode
958 /// sets the value of this key when creating an App Extension target in your
959 /// project. If you change the name of the specified class, remember to update the
960 /// value of this key.
961 ///
962 /// ## Availability
963 /// * iOS 8.0+
964 /// * macOS 10.10+
965 ///
966 /// ## Framework
967 /// * Foundation
968 #[serde(
969 rename = "NSExtensionPrincipalClass",
970 serialize_with = "crate::serialize_option",
971 skip_serializing_if = "Option::is_none"
972 )]
973 pub extension_principal_class: Option<String>,
974 /// The content scripts for a Safari extension.
975 ///
976 /// ## Availability
977 /// * macOS 10.11.5+
978 ///
979 /// ## Framework
980 /// * Safari Services
981 #[serde(
982 rename = "SFSafariContentScript",
983 serialize_with = "crate::serialize_option",
984 skip_serializing_if = "Option::is_none"
985 )]
986 pub safari_content_script: Option<Vec<SafariContentScript>>,
987 /// The context menu items for a Safari extension.
988 ///
989 /// ## Availability
990 /// * macOS 10.11.5+
991 ///
992 /// ## Framework
993 /// * Safari Services
994 #[serde(
995 rename = "SFSafariContextMenu",
996 serialize_with = "crate::serialize_option",
997 skip_serializing_if = "Option::is_none"
998 )]
999 pub safari_context_menu: Option<Vec<SafariContextMenu>>,
1000 /// The style sheet for a Safari extension.
1001 ///
1002 /// ## Availability
1003 /// * macOS 10.11.5+
1004 ///
1005 /// ## Framework
1006 /// * Safari Services
1007 #[serde(
1008 rename = "SFSafariStyleSheet",
1009 serialize_with = "crate::serialize_option",
1010 skip_serializing_if = "Option::is_none"
1011 )]
1012 pub safari_style_sheet: Option<Vec<SafariStyleSheet>>,
1013 /// The items to add to the toolbar for a Safari extension.
1014 ///
1015 /// ## Availability
1016 /// * macOS 10.11.5+
1017 ///
1018 /// ## Framework
1019 /// * Safari Services
1020 #[serde(
1021 rename = "SFSafariToolbarItem",
1022 serialize_with = "crate::serialize_option",
1023 skip_serializing_if = "Option::is_none"
1024 )]
1025 pub safari_toolbar_item: Option<SafariToolbarItem>,
1026 /// The webpages a Safari extension can access.
1027 ///
1028 /// ## Availability
1029 /// * macOS 10.11.5+
1030 ///
1031 /// ## Framework
1032 /// * Safari Services
1033 #[serde(
1034 rename = "SFSafariWebsiteAccess",
1035 serialize_with = "crate::serialize_option",
1036 skip_serializing_if = "Option::is_none"
1037 )]
1038 pub safari_website_access: Option<SafariWebsiteAccess>,
1039}
1040
1041/// Safari Website Access
1042#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Eq, Default)]
1043pub struct SafariWebsiteAccess {
1044 /// The domains that a Safari extension is allowed access to.
1045 ///
1046 /// ## Availability
1047 /// * macOS 10.11.5+
1048 ///
1049 /// ## Framework
1050 /// * Safari Services
1051 #[serde(
1052 rename = "Allowed Domains",
1053 serialize_with = "crate::serialize_option",
1054 skip_serializing_if = "Option::is_none"
1055 )]
1056 pub allowed_domains: Option<Vec<String>>,
1057 /// The level of a Safari extension’s website access.
1058 ///
1059 /// ## Availability
1060 /// * macOS 10.11.5+
1061 ///
1062 /// ## Framework
1063 /// * Safari Services
1064 #[serde(
1065 rename = "Level",
1066 serialize_with = "crate::serialize_enum_option",
1067 skip_serializing_if = "Option::is_none"
1068 )]
1069 pub level: Option<SafariWebsiteAccessLevel>,
1070}
1071
1072/// Safari Website Access Level
1073#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Eq)]
1074pub enum SafariWebsiteAccessLevel {
1075 #[serde(rename = "None")]
1076 None,
1077 #[serde(rename = "All")]
1078 All,
1079 #[serde(rename = "Some")]
1080 Some,
1081}
1082
1083/// Safari Toolbar Item
1084#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Eq, Default)]
1085pub struct SafariToolbarItem {
1086 /// The properties of an app extension's toolbar item that's been added to the Safari
1087 /// window.
1088 ///
1089 /// ## Availability
1090 /// * macOS 10.11.5+
1091 ///
1092 /// ## Framework
1093 /// * Safari Services
1094 #[serde(
1095 rename = "Action",
1096 serialize_with = "crate::serialize_option",
1097 skip_serializing_if = "Option::is_none"
1098 )]
1099 pub action: Option<String>,
1100 /// The identifier for a Safari extension's toolbar item.
1101 ///
1102 /// ## Availability
1103 /// * macOS 10.11.5+
1104 ///
1105 /// ## Framework
1106 /// * Safari Services
1107 #[serde(
1108 rename = "Identifier",
1109 serialize_with = "crate::serialize_option",
1110 skip_serializing_if = "Option::is_none"
1111 )]
1112 pub identifier: Option<String>,
1113 /// An image that represents a Safari extension's toolbar item.
1114 ///
1115 /// ## Availability
1116 /// * macOS 10.11.5+
1117 ///
1118 /// ## Framework
1119 /// * Safari Services
1120 #[serde(
1121 rename = "Image",
1122 serialize_with = "crate::serialize_option",
1123 skip_serializing_if = "Option::is_none"
1124 )]
1125 pub image: Option<String>,
1126 /// The label for the Safari extension's toolbar item.
1127 ///
1128 /// ## Availability
1129 /// * macOS 10.11.5+
1130 ///
1131 /// ## Framework
1132 /// * Safari Services
1133 #[serde(
1134 rename = "Label",
1135 serialize_with = "crate::serialize_option",
1136 skip_serializing_if = "Option::is_none"
1137 )]
1138 pub label: Option<String>,
1139}
1140
1141/// Safari Style Sheet
1142#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Eq, Default)]
1143pub struct SafariStyleSheet {
1144 /// The webpages that the script can be injected into.
1145 ///
1146 /// ## Availability
1147 /// * macOS 10.11.5+
1148 ///
1149 /// ## Framework
1150 /// * Safari Services
1151 #[serde(
1152 rename = "Allowed URL Patterns",
1153 serialize_with = "crate::serialize_option",
1154 skip_serializing_if = "Option::is_none"
1155 )]
1156 pub allowed_url_patterns: Option<Vec<String>>,
1157 /// The webpages that the script can't be injected into.
1158 ///
1159 /// ## Availability
1160 /// * macOS 10.11.5+
1161 ///
1162 /// ## Framework
1163 /// * Safari Services
1164 #[serde(
1165 rename = "Excluded URL Patterns",
1166 serialize_with = "crate::serialize_option",
1167 skip_serializing_if = "Option::is_none"
1168 )]
1169 pub excluded_url_patterns: Option<Vec<String>>,
1170 /// The path to the style sheet, relative to the Resources folder in the app
1171 /// extension's bundle.
1172 ///
1173 /// ## Availability
1174 /// * macOS 10.11.5+
1175 ///
1176 /// ## Framework
1177 /// * Safari Services
1178 #[serde(
1179 rename = "Style Sheet",
1180 serialize_with = "crate::serialize_option",
1181 skip_serializing_if = "Option::is_none"
1182 )]
1183 pub style_sheet: Option<String>,
1184}
1185
1186/// The context menu items for a Safari extension
1187#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Eq, Default)]
1188pub struct SafariContextMenu {
1189 /// The command to send to the app extension when the user selects the context menu
1190 /// item.
1191 ///
1192 /// ## Availability
1193 /// * macOS 10.11.5+
1194 ///
1195 /// ## Framework
1196 /// * Safari Services
1197 #[serde(
1198 rename = "Command",
1199 serialize_with = "crate::serialize_option",
1200 skip_serializing_if = "Option::is_none"
1201 )]
1202 pub command: Option<String>,
1203 /// The text to display for the context menu item.
1204 ///
1205 /// ## Availability
1206 /// * macOS 10.11.5+
1207 ///
1208 /// ## Framework
1209 /// * Safari Services
1210 #[serde(
1211 rename = "Text",
1212 serialize_with = "crate::serialize_option",
1213 skip_serializing_if = "Option::is_none"
1214 )]
1215 pub text: Option<String>,
1216}
1217
1218/// Safari Content Script
1219#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Eq, Default)]
1220pub struct SafariContentScript {
1221 /// The webpages that the script can be injected into.
1222 ///
1223 /// ## Availability
1224 /// * macOS 10.11.5+
1225 ///
1226 /// ## Framework
1227 /// * Safari Services
1228 #[serde(
1229 rename = "Allowed URL Patterns",
1230 serialize_with = "crate::serialize_option",
1231 skip_serializing_if = "Option::is_none"
1232 )]
1233 pub allowed_url_patterns: Option<Vec<String>>,
1234 /// The webpages that the script can't be injected into.
1235 ///
1236 /// ## Availability
1237 /// * macOS 10.11.5+
1238 ///
1239 /// ## Framework
1240 /// * Safari Services
1241 #[serde(
1242 rename = "Excluded URL Patterns",
1243 serialize_with = "crate::serialize_option",
1244 skip_serializing_if = "Option::is_none"
1245 )]
1246 pub excluded_url_patterns: Option<Vec<String>>,
1247 /// The path to the content script, relative to the Resources folder in the app
1248 /// extension's bundle.
1249 ///
1250 /// ## Availability
1251 /// * macOS 10.11.5+
1252 ///
1253 /// ## Framework
1254 /// * Safari Services
1255 #[serde(
1256 rename = "Script",
1257 serialize_with = "crate::serialize_option",
1258 skip_serializing_if = "Option::is_none"
1259 )]
1260 pub script: Option<String>,
1261}
1262
1263/// Extension Point Identifier
1264#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Eq)]
1265pub enum ExtensionPointIdentifier {
1266 #[serde(rename = "com.apple.ui-services")]
1267 UiServices,
1268 #[serde(rename = "com.apple.services")]
1269 Services,
1270 #[serde(rename = "com.apple.keyboard-service")]
1271 KeyboardService,
1272 #[serde(rename = "com.apple.fileprovider-nonui")]
1273 FileproviderNonui,
1274 #[serde(rename = "com.apple.fileprovider-actionsui")]
1275 FileproviderActionsui,
1276 #[serde(rename = "com.apple.FinderSync")]
1277 FinderSync,
1278 #[serde(rename = "com.apple.identitylookup.message-filter")]
1279 IdentityLookupMessageFilter,
1280 #[serde(rename = "com.apple.photo-editing")]
1281 PhotoEditing,
1282 #[serde(rename = "com.apple.share-services")]
1283 ShareServices,
1284 #[serde(rename = "com.apple.callkit.call-directory")]
1285 CallkitCallDirectory,
1286 #[serde(rename = "com.apple.authentication-services-account-authentication-modification-ui")]
1287 AuthenticationServicesAccountAuthenticationModificationUi,
1288 #[serde(rename = "com.apple.AudioUnit-UI")]
1289 AudioUnitUi,
1290 #[serde(rename = "com.apple.AppSSO.idp-extension")]
1291 AppSsoIdpExtension,
1292 #[serde(rename = "com.apple.authentication-services-credential-provider-ui")]
1293 AuthenticationServicesCredentialProviderUi,
1294 #[serde(rename = "com.apple.broadcast-services-setupui")]
1295 BroadcastServicesSetupui,
1296 #[serde(rename = "com.apple.broadcast-services-upload")]
1297 BroadcastServicesUpload,
1298 #[serde(rename = "com.apple.classkit.context-provider")]
1299 ClasskitContextProvider,
1300 #[serde(rename = "com.apple.Safari.content-blocker")]
1301 SafariContentBlocker,
1302 #[serde(rename = "com.apple.message-payload-provider")]
1303 MessagePayloadProvider,
1304 #[serde(rename = "com.apple.intents-service")]
1305 IntentsService,
1306 #[serde(rename = "com.apple.intents-ui-service")]
1307 IntentsUiService,
1308 #[serde(rename = "com.apple.networkextension.app-proxy")]
1309 NetworkExtensionAppProxy,
1310 #[serde(rename = "com.apple.usernotifications.content-extension")]
1311 UsernotificationsContentExtension,
1312 #[serde(rename = "com.apple.usernotifications.service")]
1313 UsernotificationsService,
1314 #[serde(rename = "com.apple.ctk-tokens")]
1315 CtkTokens,
1316 #[serde(rename = "com.apple.photo-project")]
1317 PhotoProject,
1318 #[serde(rename = "com.apple.quicklook.preview")]
1319 QuicklookPreview,
1320 #[serde(rename = "com.apple.Safari.extension")]
1321 SafariExtension,
1322 #[serde(rename = "com.apple.spotlight.index")]
1323 SpotlightIndex,
1324 #[serde(rename = "com.apple.quicklook.thumbnail")]
1325 QuicklookThumbnail,
1326 #[serde(rename = "com.apple.tv-top-shelf")]
1327 TvTopShelf,
1328 #[serde(rename = "com.apple.identitylookup.classification-ui")]
1329 ClassificationUi,
1330 #[serde(rename = "com.apple.widgetkit-extension")]
1331 WidgetkitExtension,
1332 #[serde(rename = "com.apple.dt.Xcode.extension.source-editor")]
1333 ExtensionSourceEditor,
1334}
1335
1336/// Extension Attributes
1337#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Default)]
1338pub struct ExtensionAttributes {
1339 /// A Boolean value indicating whether the extension appears in the Finder Preview
1340 /// pane and Quick Actions menu.
1341 ///
1342 /// ## Availability
1343 /// * macOS 10.14+
1344 ///
1345 /// ## Framework
1346 /// * AppKit
1347 #[serde(
1348 rename = "NSExtensionServiceAllowsFinderPreviewItem",
1349 serialize_with = "crate::serialize_option",
1350 skip_serializing_if = "Option::is_none"
1351 )]
1352 pub allows_finder_preview_item: Option<bool>,
1353 /// A Boolean value indicating whether an Action extension displays an item in a
1354 /// window’s toolbar.
1355 ///
1356 /// ## Availability
1357 /// * macOS 10.10+
1358 ///
1359 /// ## Framework
1360 /// * AppKit
1361 #[serde(
1362 rename = "NSExtensionServiceAllowsToolbarItem",
1363 serialize_with = "crate::serialize_option",
1364 skip_serializing_if = "Option::is_none"
1365 )]
1366 pub allows_toolbar_item: Option<bool>,
1367 /// A Boolean value indicating whether the extension appears as a Quick Action in the
1368 /// Touch Bar.
1369 ///
1370 /// ## Availability
1371 /// * macOS 10.14+
1372 ///
1373 /// ## Framework
1374 /// * AppKit
1375 #[serde(
1376 rename = "NSExtensionServiceAllowsTouchBarItem",
1377 serialize_with = "crate::serialize_option",
1378 skip_serializing_if = "Option::is_none"
1379 )]
1380 pub allows_touch_bar_item: Option<bool>,
1381 /// The name of an icon for display when the extension appears in the Finder Preview
1382 /// pane and Quick Actions menu.
1383 ///
1384 /// This key is used in conjunction with the NSExtensionServiceAllowsFinderPreviewItem
1385 /// key.
1386 ///
1387 /// Set the NSExtensionServiceFinderPreviewIconName key's value to a system icon name
1388 /// or the name of an icon in the extension bundle. This icon should be a template
1389 /// image: a monochromatic image with transparency, anti-aliasing, and no drop
1390 /// shadow that uses a mask to define its shape. For design guidance, see Human
1391 /// Interface Guidelines > macOS > Custom Icons. If no icon is specified, a
1392 /// default icon is used.
1393 ///
1394 /// ## Availability
1395 /// * macOS 10.14+
1396 ///
1397 /// ## Framework
1398 /// * AppKit
1399 #[serde(
1400 rename = "NSExtensionServiceFinderPreviewIconName",
1401 serialize_with = "crate::serialize_option",
1402 skip_serializing_if = "Option::is_none"
1403 )]
1404 pub finder_preview_icon_name: Option<String>,
1405 /// A name for display when the extension appears in the Finder Preview pane and Quick
1406 /// Actions menu.
1407 ///
1408 /// This key is used in conjunction with the NSExtensionServiceAllowsFinderPreviewItem
1409 /// key.
1410 ///
1411 /// If the NSExtensionServiceFinderPreviewLabel key isn't provided, the extension's
1412 /// display name is used.
1413 ///
1414 /// ## Availability
1415 /// * macOS 10.14+
1416 ///
1417 /// ## Framework
1418 /// * AppKit
1419 #[serde(
1420 rename = "NSExtensionServiceFinderPreviewLabel",
1421 serialize_with = "crate::serialize_option",
1422 skip_serializing_if = "Option::is_none"
1423 )]
1424 pub finder_preview_label: Option<String>,
1425 /// The type of task an Action extension performs.
1426 ///
1427 /// ## Availability
1428 /// * macOS 10.10+
1429 ///
1430 /// ## Framework
1431 /// * AppKit
1432 #[serde(
1433 rename = "NSExtensionServiceRoleType",
1434 skip_serializing_if = "Option::is_none",
1435 serialize_with = "crate::serialize_enum_option"
1436 )]
1437 pub role_type: Option<ExtensionServiceRoleType>,
1438 /// The image for an Action extension’s toolbar item.
1439 ///
1440 /// ## Availability
1441 /// * macOS 10.10+
1442 ///
1443 /// ## Framework
1444 /// * AppKit
1445 #[serde(
1446 rename = "NSExtensionServiceToolbarIconFile",
1447 serialize_with = "crate::serialize_option",
1448 skip_serializing_if = "Option::is_none"
1449 )]
1450 pub toolbar_icon_file: Option<String>,
1451 /// The label for an Action extension's toolbar item.
1452 ///
1453 /// ## Availability
1454 /// * macOS 10.10+
1455 ///
1456 /// ## Framework
1457 /// * AppKit
1458 #[serde(
1459 rename = "NSExtensionServiceToolbarPaletteLabel",
1460 serialize_with = "crate::serialize_option",
1461 skip_serializing_if = "Option::is_none"
1462 )]
1463 pub toolbar_palette_label: Option<String>,
1464 /// The color to use for the bezel around the extension when it appears as a Quick
1465 /// Action in the Touch Bar.
1466 ///
1467 /// This key is used in conjunction with the NSExtensionServiceAllowsTouchBarItem key.
1468 ///
1469 /// Set the NSExtensionServiceTouchBarBezelColorName key's value to the name of a
1470 /// color that exists in your extension's asset catalog—a color that matches a
1471 /// system color is recommended. If no color is specified, a default color is used.
1472 ///
1473 /// ## Availability
1474 /// * macOS 10.14+
1475 ///
1476 /// ## Framework
1477 /// * AppKit
1478 #[serde(
1479 rename = "NSExtensionServiceTouchBarBezelColorName",
1480 serialize_with = "crate::serialize_option",
1481 skip_serializing_if = "Option::is_none"
1482 )]
1483 pub touch_bar_bezel_color_name: Option<String>,
1484 /// The name of an icon for display when the extension appears as a Quick Action in
1485 /// the Touch Bar.
1486 ///
1487 /// This key is used in conjunction with the NSExtensionServiceAllowsTouchBarItem key.
1488 ///
1489 /// Set the NSExtensionServiceTouchBarIconName key's value to a system icon name or
1490 /// the name of an icon within the extension bundle. This icon should be a
1491 /// template image: a monochromatic image with transparency, anti-aliasing, and no
1492 /// drop shadow that uses a mask to define its shape. For design guidance, see
1493 /// Human Interface Guidelines > macOS > Custom Icons. If no icon is specified,
1494 /// a default icon is used.
1495 ///
1496 /// ## Availability
1497 /// * macOS 10.14+
1498 ///
1499 /// ## Framework
1500 /// * AppKit
1501 #[serde(
1502 rename = "NSExtensionServiceTouchBarIconName",
1503 serialize_with = "crate::serialize_option",
1504 skip_serializing_if = "Option::is_none"
1505 )]
1506 pub touch_bar_icon_name: Option<String>,
1507 /// A name for display when the extension appears as a Quick Action in the Touch Bar.
1508 ///
1509 /// This key is used in conjunction with the NSExtensionServiceAllowsTouchBarItem key.
1510 ///
1511 /// If the NSExtensionServiceTouchBarLabel key isn't provided, the extension's display
1512 /// name is used.
1513 ///
1514 /// ## Availability
1515 /// * macOS 10.14+
1516 ///
1517 /// ## Framework
1518 /// * AppKit
1519 #[serde(
1520 rename = "NSExtensionServiceTouchBarLabel",
1521 serialize_with = "crate::serialize_option",
1522 skip_serializing_if = "Option::is_none"
1523 )]
1524 pub touch_bar_label: Option<String>,
1525 /// A Boolean value indicating whether the Action extension is presented in full
1526 /// screen.
1527 ///
1528 /// ## Availability
1529 /// * iOS 8.0+
1530 ///
1531 /// ## Framework
1532 /// * Foundation
1533 #[serde(
1534 rename = "NSExtensionActionWantsFullScreenPresentation",
1535 serialize_with = "crate::serialize_option",
1536 skip_serializing_if = "Option::is_none"
1537 )]
1538 pub action_wants_full_screen_presentation: Option<bool>,
1539 /// This key is mutually exclusive with NSExtensionPrincipalClass. If the app
1540 /// extension’s Info.plist file contains both keys, the system won’t load the
1541 /// extension.
1542 ///
1543 /// ## Availability
1544 /// * iOS 8.0+
1545 /// * macOS 10.10+
1546 ///
1547 /// ## Framework
1548 /// * Foundation
1549 #[serde(
1550 rename = "NSExtensionMainStoryboard",
1551 serialize_with = "crate::serialize_option",
1552 skip_serializing_if = "Option::is_none"
1553 )]
1554 pub main_storyboard: Option<String>,
1555 /// A Boolean value indicating whether the app extension ignores appearance changes
1556 /// made by the host app.
1557 ///
1558 /// ## Availability
1559 /// * iOS 10.0+
1560 ///
1561 /// ## Framework
1562 /// * Foundation
1563 #[serde(
1564 rename = "NSExtensionOverridesHostUIAppearance",
1565 serialize_with = "crate::serialize_option",
1566 skip_serializing_if = "Option::is_none"
1567 )]
1568 pub overrides_host_ui_appearance: Option<bool>,
1569 /// The extension point that supports an app extension.
1570 ///
1571 /// ## Availability
1572 /// * iOS 8.0+
1573 /// * macOS 10.10+
1574 ///
1575 /// ## Framework
1576 /// * Foundation
1577 #[serde(
1578 rename = "NSExtensionPointIdentifier",
1579 skip_serializing_if = "Option::is_none",
1580 serialize_with = "crate::serialize_enum_option"
1581 )]
1582 pub point_identifier: Option<ExtensionPointIdentifier>,
1583 /// This key is mutually exclusive with NSExtensionMainStoryboard. If the app
1584 /// extension’s Info.plist file contains both keys, the system won’t load the
1585 /// extension.
1586 ///
1587 /// ## Availability
1588 /// * iOS 8.0+
1589 /// * macOS 10.10+
1590 ///
1591 /// ## Framework
1592 /// * Foundation
1593 #[serde(
1594 rename = "NSExtensionPrincipalClass",
1595 serialize_with = "crate::serialize_option",
1596 skip_serializing_if = "Option::is_none"
1597 )]
1598 pub principal_class: Option<String>,
1599 /// The semantic data types that a Share or Action extension supports.
1600 ///
1601 /// ## Availability
1602 /// * iOS 8.0+
1603 /// * macOS 10.10+
1604 ///
1605 /// ## Framework
1606 /// * Foundation
1607 #[serde(
1608 rename = "NSExtensionActivationRule",
1609 serialize_with = "crate::serialize_option",
1610 skip_serializing_if = "Option::is_none"
1611 )]
1612 pub activation_rule: Option<ActivationRule>,
1613 /// The name of a JavaScript file supplied by a Share or Action extension.
1614 ///
1615 /// ## Availability
1616 /// * iOS 8.0+
1617 /// * macOS 10.10+
1618 ///
1619 /// ## Framework
1620 /// * Foundation
1621 #[serde(
1622 rename = "NSExtensionJavaScriptPreprocessingFile",
1623 serialize_with = "crate::serialize_option",
1624 skip_serializing_if = "Option::is_none"
1625 )]
1626 pub java_script_preprocessing_file: Option<String>,
1627 /// The names of the intents that an extension supports.
1628 ///
1629 /// ## Availability
1630 /// * macOS 10.0+
1631 ///
1632 /// ## Framework
1633 /// * Foundation
1634 #[serde(
1635 rename = "IntentsSupported",
1636 serialize_with = "crate::serialize_option",
1637 skip_serializing_if = "Option::is_none"
1638 )]
1639 pub intents_supported: Option<Vec<String>>,
1640 /// Types of media supported by an app extension’s media-playing intents.
1641 ///
1642 /// Specify one or more media categories to allow Siri to invoke your app’s intent
1643 /// handling when a user asks to play media. Use INMediaCategoryGeneral for media
1644 /// that doesn’t fit into any of the other categories, like white noise or sound
1645 /// effects.
1646 ///
1647 /// To specify this information in Xcode, add INPlayMediaIntent to your extension’s
1648 /// list of Supported Intents. Then select the relevant media types in the list
1649 /// that appears.
1650 ///
1651 /// ## Availability
1652 /// * iOS 13.0+
1653 ///
1654 /// ## Framework
1655 /// * Foundation
1656 #[serde(
1657 rename = "SupportedMediaCategories",
1658 serialize_with = "crate::serialize_vec_enum_option",
1659 skip_serializing_if = "Option::is_none"
1660 )]
1661 pub supported_media_categories: Option<Vec<MediaCategories>>,
1662 /// A Boolean value indicating whether the Photos app gets a list of supported project
1663 /// types from an extension.
1664 ///
1665 /// ## Availability
1666 /// * macOS 10.14+
1667 ///
1668 /// ## Framework
1669 /// * Photos
1670 #[serde(
1671 rename = "PHProjectExtensionDefinesProjectTypes",
1672 serialize_with = "crate::serialize_option",
1673 skip_serializing_if = "Option::is_none"
1674 )]
1675 pub project_extension_defines_project_types: Option<bool>,
1676 /// The types of assets a Photo Editing extension can edit.
1677 ///
1678 /// ## Availability
1679 /// * iOS 8.0+
1680 ///
1681 /// ## Framework
1682 /// * Photos
1683 #[serde(
1684 rename = "PHSupportedMediaTypes",
1685 serialize_with = "crate::serialize_vec_enum_option",
1686 skip_serializing_if = "Option::is_none"
1687 )]
1688 pub supported_media_types: Option<Vec<MediaTypes>>,
1689 /// The server that a Message Filter app extension may defer a query to.
1690 ///
1691 /// ## Availability
1692 /// * iOS 11.0+
1693 ///
1694 /// ## Framework
1695 /// * UIKit
1696 #[serde(
1697 rename = "IDMessageFilterExtensionNetworkURL",
1698 serialize_with = "crate::serialize_option",
1699 skip_serializing_if = "Option::is_none"
1700 )]
1701 pub id_message_filter_extension_network_url: Option<String>,
1702 /// The phone number that receives SMS messages when the user reports an SMS message
1703 /// or a call.
1704 ///
1705 /// ## Availability
1706 /// * iOS 12.0+
1707 ///
1708 /// ## Framework
1709 /// * UIKit
1710 #[serde(
1711 rename = "ILClassificationExtensionSMSReportDestination",
1712 serialize_with = "crate::serialize_option",
1713 skip_serializing_if = "Option::is_none"
1714 )]
1715 pub classification_extension_sms_report_destination: Option<String>,
1716 /// A Boolean value indicating whether a custom keyboard displays standard ASCII
1717 /// characters.
1718 ///
1719 /// ## Availability
1720 /// * iOS 8.0+
1721 ///
1722 /// ## Framework
1723 /// * UIKit
1724 #[serde(
1725 rename = "IsASCIICapable",
1726 serialize_with = "crate::serialize_option",
1727 skip_serializing_if = "Option::is_none"
1728 )]
1729 pub is_ascii_capable: Option<String>,
1730 /// The contexts that an iMessage app or sticker pack supports.
1731 ///
1732 /// ## Availability
1733 /// * iOS 12.0+
1734 ///
1735 /// ## Framework
1736 /// * UIKit
1737 #[serde(
1738 rename = "MSMessagesAppPresentationContextMessages",
1739 serialize_with = "crate::serialize_vec_enum_option",
1740 skip_serializing_if = "Option::is_none"
1741 )]
1742 pub messages_app_presentation_context_messages: Option<Vec<ContextMessages>>,
1743 /// The custom actions for a File Provider extension.
1744 ///
1745 /// ## Availability
1746 /// * iOS 11.0+
1747 ///
1748 /// ## Framework
1749 /// * UIKit
1750 #[serde(
1751 rename = "NSExtensionFileProviderActions",
1752 serialize_with = "crate::serialize_option",
1753 skip_serializing_if = "Option::is_none"
1754 )]
1755 pub file_provider_actions: Option<Vec<FileProviderAction>>,
1756 /// The identifier of a shared container that can be accessed by a Document Picker
1757 /// extension and its associated File Provider extension.
1758 ///
1759 /// ## Availability
1760 /// * iOS 8.0+
1761 ///
1762 /// ## Framework
1763 /// * UIKit
1764 #[serde(
1765 rename = "NSExtensionFileProviderDocumentGroup",
1766 serialize_with = "crate::serialize_option",
1767 skip_serializing_if = "Option::is_none"
1768 )]
1769 pub file_provider_document_group: Option<String>,
1770 /// A Boolean value indicating whether a File Provider extension enumerates its
1771 /// content.
1772 ///
1773 /// ## Availability
1774 /// * iOS 11.0+
1775 ///
1776 /// ## Framework
1777 /// * UIKit
1778 #[serde(
1779 rename = "NSExtensionFileProviderSupportsEnumeration",
1780 serialize_with = "crate::serialize_option",
1781 skip_serializing_if = "Option::is_none"
1782 )]
1783 pub file_provider_supports_enumeration: Option<bool>,
1784 /// A Boolean value indicating whether a keyboard extension supports right-to-left
1785 /// languages.
1786 ///
1787 /// ## Availability
1788 /// * iOS 8.0+
1789 ///
1790 /// ## Framework
1791 /// * UIKit
1792 #[serde(
1793 rename = "PrefersRightToLeft",
1794 serialize_with = "crate::serialize_option",
1795 skip_serializing_if = "Option::is_none"
1796 )]
1797 pub prefers_right_to_left: Option<bool>,
1798 /// The primary language for a keyboard extension.
1799 ///
1800 /// ## Availability
1801 /// * iOS 8.0+
1802 ///
1803 /// ## Framework
1804 /// * UIKit
1805 #[serde(
1806 rename = "PrimaryLanguage",
1807 serialize_with = "crate::serialize_option",
1808 skip_serializing_if = "Option::is_none"
1809 )]
1810 pub primary_language: Option<String>,
1811 /// A Boolean value indicating whether a custom keyboard uses a shared container and
1812 /// accesses the network.
1813 ///
1814 /// ## Availability
1815 /// * iOS 8.0+
1816 ///
1817 /// ## Framework
1818 /// * UIKit
1819 #[serde(
1820 rename = "RequestsOpenAccess",
1821 serialize_with = "crate::serialize_option",
1822 skip_serializing_if = "Option::is_none"
1823 )]
1824 pub requests_open_access: Option<bool>,
1825 /// The modes that a Document Picker extension supports.
1826 ///
1827 /// ## Availability
1828 /// * iOS 8.0+
1829 ///
1830 /// ## Framework
1831 /// * UIKit
1832 #[serde(
1833 rename = "UIDocumentPickerModes",
1834 skip_serializing_if = "Option::is_none",
1835 serialize_with = "crate::serialize_vec_enum_option"
1836 )]
1837 pub document_picker_modes: Option<Vec<DocumentPickerModes>>,
1838 /// The Uniform Type Identifiers that a document picker extension supports.
1839 ///
1840 /// ## Availability
1841 /// * iOS 8.0+
1842 ///
1843 /// ## Framework
1844 /// * UIKit
1845 #[serde(
1846 rename = "UIDocumentPickerSupportedFileTypes",
1847 serialize_with = "crate::serialize_option",
1848 skip_serializing_if = "Option::is_none"
1849 )]
1850 pub document_picker_supported_file_types: Option<Vec<String>>,
1851 /// The identifier of a category declared by the app extension.
1852 ///
1853 /// ## Availability
1854 /// * iOS 10.0+
1855 ///
1856 /// ## Framework
1857 /// * UIKit
1858 #[serde(
1859 rename = "UNNotificationExtensionCategory",
1860 serialize_with = "crate::serialize_option",
1861 skip_serializing_if = "Option::is_none"
1862 )]
1863 pub notification_extension_category: Option<String>,
1864 /// A Boolean value indicating whether only the app extension's custom view controller
1865 /// is displayed in the notification interface.
1866 ///
1867 /// ## Availability
1868 /// * iOS 10.0+
1869 ///
1870 /// ## Framework
1871 /// * UIKit
1872 #[serde(
1873 rename = "UNNotificationExtensionDefaultContentHidden",
1874 serialize_with = "crate::serialize_option",
1875 skip_serializing_if = "Option::is_none"
1876 )]
1877 pub notification_extension_default_content_hidden: Option<bool>,
1878 /// The initial size of the view controller's view for an app extension, expressed as
1879 /// a ratio of its height to its width.
1880 ///
1881 /// ## Availability
1882 /// * iOS 10.0+
1883 ///
1884 /// ## Framework
1885 /// * UIKit
1886 #[serde(
1887 rename = "UNNotificationExtensionInitialContentSizeRatio",
1888 serialize_with = "crate::serialize_option",
1889 skip_serializing_if = "Option::is_none"
1890 )]
1891 pub notification_extension_initial_content_size_ratio: Option<f32>,
1892 /// A Boolean value indicating whether the title of the app extension's view
1893 /// controller is used as the title of the notification.
1894 ///
1895 /// ## Availability
1896 /// * iOS 10.0+
1897 ///
1898 /// ## Framework
1899 /// * UIKit
1900 #[serde(
1901 rename = "UNNotificationExtensionOverridesDefaultTitle",
1902 serialize_with = "crate::serialize_option",
1903 skip_serializing_if = "Option::is_none"
1904 )]
1905 pub notification_extension_overrides_default_title: Option<bool>,
1906 /// A Boolean value indicating whether user interactions in a custom notification are
1907 /// enabled.
1908 ///
1909 /// ## Availability
1910 /// * iOS 12.0+
1911 ///
1912 /// ## Framework
1913 /// * UIKit
1914 #[serde(
1915 rename = "UNNotificationExtensionUserInteractionEnabled",
1916 serialize_with = "crate::serialize_option",
1917 skip_serializing_if = "Option::is_none"
1918 )]
1919 pub notification_extension_user_interaction_enabled: Option<bool>,
1920}
1921
1922/// Document Picker Modes
1923#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Eq)]
1924pub enum DocumentPickerModes {
1925 #[serde(rename = "UIDocumentPickerModeImport")]
1926 Import,
1927 #[serde(rename = "UIDocumentPickerModeOpen")]
1928 Open,
1929 #[serde(rename = "UIDocumentPickerModeExportToService")]
1930 ExportToService,
1931 #[serde(rename = "UIDocumentPickerModeMoveToService")]
1932 MoveToService,
1933}
1934
1935/// File Provider Action
1936#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Eq, Default)]
1937pub struct FileProviderAction {
1938 /// A predicate that determines whether a File Provider extension action appears in
1939 /// the context menu.
1940 ///
1941 /// ## Availability
1942 /// * iOS 11.0+
1943 ///
1944 /// ## Framework
1945 /// * UIKit
1946 #[serde(
1947 rename = "NSExtensionFileProviderActionActivationRule",
1948 serialize_with = "crate::serialize_option",
1949 skip_serializing_if = "Option::is_none"
1950 )]
1951 pub activation_rule: Option<String>,
1952 /// A unique identifier for a File Provider extension action.
1953 ///
1954 /// ## Availability
1955 /// * iOS 11.0+
1956 ///
1957 /// ## Framework
1958 /// * UIKit
1959 #[serde(
1960 rename = "NSExtensionFileProviderActionIdentifier",
1961 serialize_with = "crate::serialize_option",
1962 skip_serializing_if = "Option::is_none"
1963 )]
1964 pub identifier: Option<String>,
1965 /// The localized name for a File Provider extension action that appears in the
1966 /// context menu.
1967 ///
1968 /// ## Availability
1969 /// * iOS 11.0+
1970 ///
1971 /// ## Framework
1972 /// * UIKit
1973 #[serde(
1974 rename = "NSExtensionFileProviderActionName",
1975 serialize_with = "crate::serialize_option",
1976 skip_serializing_if = "Option::is_none"
1977 )]
1978 pub name: Option<String>,
1979}
1980
1981/// Context Messages
1982#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Eq)]
1983pub enum ContextMessages {
1984 #[serde(rename = "MSMessagesAppPresentationContextMessages")]
1985 Messages,
1986 #[serde(rename = "MSMessagesAppPresentationContextMedia")]
1987 Media,
1988}
1989
1990/// Media Types
1991#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Eq)]
1992pub enum MediaTypes {
1993 #[serde(rename = "Image")]
1994 Image,
1995 #[serde(rename = "Video")]
1996 Video,
1997}
1998
1999/// Media Categories
2000#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Eq)]
2001pub enum MediaCategories {
2002 #[serde(rename = "INMediaCategoryAudiobooks")]
2003 Audiobooks,
2004 #[serde(rename = "INMediaCategoryMusic")]
2005 Music,
2006 #[serde(rename = "INMediaCategoryGeneral")]
2007 General,
2008 #[serde(rename = "INMediaCategoryPodcasts")]
2009 Podcasts,
2010 #[serde(rename = "INMediaCategoryRadio")]
2011 Radio,
2012}
2013
2014/// Activation Rule
2015#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Eq, Default)]
2016pub struct ActivationRule {
2017 /// The version of the parent extension-activation rule dictionary.
2018 ///
2019 /// ## Availability
2020 /// * iOS 9.0+
2021 /// * macOS 10.11+
2022 ///
2023 /// ## Framework
2024 /// * Foundation
2025 #[serde(
2026 rename = "NSExtensionActivationDictionaryVersion",
2027 serialize_with = "crate::serialize_option",
2028 skip_serializing_if = "Option::is_none"
2029 )]
2030 pub dictionary_version: Option<i32>,
2031 /// The maximum number of attachments that the app extension supports.
2032 ///
2033 /// ## Availability
2034 /// * iOS 8.0+
2035 /// * macOS 10.10+
2036 ///
2037 /// ## Framework
2038 /// * Foundation
2039 #[serde(
2040 rename = "NSExtensionActivationSupportsAttachmentsWithMaxCount",
2041 serialize_with = "crate::serialize_option",
2042 skip_serializing_if = "Option::is_none"
2043 )]
2044 pub supports_attachments_with_max_count: Option<i32>,
2045 /// The minimum number of attachments that the app extension supports.
2046 ///
2047 /// ## Availability
2048 /// * iOS 8.0+
2049 /// * macOS 10.10+
2050 ///
2051 /// ## Framework
2052 /// * Foundation
2053 #[serde(
2054 rename = "NSExtensionActivationSupportsAttachmentsWithMinCount",
2055 serialize_with = "crate::serialize_option",
2056 skip_serializing_if = "Option::is_none"
2057 )]
2058 pub supports_attachments_with_min_count: Option<i32>,
2059 /// The maximum number of all types of files that the app extension supports.
2060 ///
2061 /// ## Availability
2062 /// * iOS 8.0+
2063 /// * macOS 10.10+
2064 ///
2065 /// ## Framework
2066 /// * Foundation
2067 #[serde(
2068 rename = "NSExtensionActivationSupportsFileWithMaxCount",
2069 serialize_with = "crate::serialize_option",
2070 skip_serializing_if = "Option::is_none"
2071 )]
2072 pub supports_file_with_max_count: Option<i32>,
2073 /// The maximum number of image files that the app extension supports.
2074 ///
2075 /// ## Availability
2076 /// * iOS 8.0+
2077 /// * macOS 10.10+
2078 ///
2079 /// ## Framework
2080 /// * Foundation
2081 #[serde(
2082 rename = "NSExtensionActivationSupportsImageWithMaxCount",
2083 serialize_with = "crate::serialize_option",
2084 skip_serializing_if = "Option::is_none"
2085 )]
2086 pub supports_image_with_max_count: Option<i32>,
2087 /// The maximum number of movie files that the app extension supports.
2088 ///
2089 /// ## Availability
2090 /// * iOS 8.0+
2091 /// * macOS 10.10+
2092 ///
2093 /// ## Framework
2094 /// * Foundation
2095 #[serde(
2096 rename = "NSExtensionActivationSupportsMovieWithMaxCount",
2097 serialize_with = "crate::serialize_option",
2098 skip_serializing_if = "Option::is_none"
2099 )]
2100 pub supports_movie_with_max_count: Option<i32>,
2101 /// A Boolean value indicating whether the app extension supports text.
2102 ///
2103 /// ## Availability
2104 /// * iOS 8.0+
2105 /// * macOS 10.10+
2106 ///
2107 /// ## Framework
2108 /// * Foundation
2109 #[serde(
2110 rename = "NSExtensionActivationSupportsText",
2111 serialize_with = "crate::serialize_option",
2112 skip_serializing_if = "Option::is_none"
2113 )]
2114 pub supports_text: Option<bool>,
2115 /// The maximum number of webpages that the app extension supports.
2116 ///
2117 /// ## Availability
2118 /// * iOS 8.0+
2119 /// * macOS 10.10+
2120 ///
2121 /// ## Framework
2122 /// * Foundation
2123 #[serde(
2124 rename = "NSExtensionActivationSupportsWebPageWithMaxCount",
2125 serialize_with = "crate::serialize_option",
2126 skip_serializing_if = "Option::is_none"
2127 )]
2128 pub supports_web_page_with_max_count: Option<i32>,
2129 /// The maximum number of HTTP URLs that the app extension supports.
2130 ///
2131 /// ## Availability
2132 /// * iOS 8.0+
2133 /// * macOS 10.10+
2134 ///
2135 /// ## Framework
2136 /// * Foundation
2137 #[serde(
2138 rename = "NSExtensionActivationSupportsWebURLWithMaxCount",
2139 serialize_with = "crate::serialize_option",
2140 skip_serializing_if = "Option::is_none"
2141 )]
2142 pub supports_web_url_with_max_count: Option<i32>,
2143 /// A Boolean value indicating whether strict or fuzzy matching is used when
2144 /// determining the asset types an app extension handles.
2145 ///
2146 /// ## Availability
2147 /// * iOS 9.0+
2148 /// * macOS 10.11+
2149 ///
2150 /// ## Framework
2151 /// * Foundation
2152 #[serde(
2153 rename = "NSExtensionActivationUsesStrictMatching",
2154 serialize_with = "crate::serialize_option",
2155 skip_serializing_if = "Option::is_none"
2156 )]
2157 pub uses_strict_matching: Option<bool>,
2158}
2159
2160/// Extension Service Role Type
2161#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Eq)]
2162pub enum ExtensionServiceRoleType {
2163 #[serde(rename = "Editor")]
2164 Editor,
2165 #[serde(rename = "Viewer")]
2166 Viewer,
2167}
2168
2169/// Service
2170#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Eq, Default)]
2171pub struct Service {
2172 /// A keyboard shortcut that invokes the service menu command.
2173 ///
2174 /// ## Availability
2175 /// * macOS 10.0+
2176 ///
2177 /// ## Framework
2178 /// * AppKit
2179 #[serde(
2180 rename = "NSKeyEquivalent",
2181 serialize_with = "crate::serialize_option",
2182 skip_serializing_if = "Option::is_none"
2183 )]
2184 pub key_equivalent: Option<DefaultDictionary>,
2185 /// Text for a Services menu item.
2186 ///
2187 /// ## Availability
2188 /// * macOS 10.0+
2189 ///
2190 /// ## Framework
2191 /// * AppKit
2192 #[serde(rename = "NSMenuItem")]
2193 pub menu_item: DefaultDictionary,
2194 /// An instance method that invokes the service.
2195 ///
2196 /// ## Availability
2197 /// * macOS 10.0+
2198 ///
2199 /// ## Framework
2200 /// * AppKit
2201 #[serde(rename = "NSMessage")]
2202 pub message: String,
2203 /// The port that the service monitors for incoming requests.
2204 ///
2205 /// ## Availability
2206 /// * macOS 10.0+
2207 ///
2208 /// ## Framework
2209 /// * AppKit
2210 #[serde(
2211 rename = "NSPortName",
2212 serialize_with = "crate::serialize_option",
2213 skip_serializing_if = "Option::is_none"
2214 )]
2215 pub port_name: Option<String>,
2216 /// The data types that the service returns.
2217 ///
2218 /// ## Availability
2219 /// * macOS 10.0+
2220 ///
2221 /// ## Framework
2222 /// * AppKit
2223 #[serde(
2224 rename = "NSReturnTypes",
2225 serialize_with = "crate::serialize_option",
2226 skip_serializing_if = "Option::is_none"
2227 )]
2228 pub return_types: Option<Vec<String>>,
2229 /// The data types that the service can read.
2230 ///
2231 /// ## Availability
2232 /// * macOS 10.0+
2233 ///
2234 /// ## Framework
2235 /// * AppKit
2236 #[serde(
2237 rename = "NSSendTypes",
2238 serialize_with = "crate::serialize_option",
2239 skip_serializing_if = "Option::is_none"
2240 )]
2241 pub send_types: Option<Vec<String>>,
2242 /// The amount of time, in milliseconds, that the system waits for a response from the
2243 /// service.
2244 ///
2245 /// ## Availability
2246 /// * macOS 10.0+
2247 ///
2248 /// ## Framework
2249 /// * AppKit
2250 #[serde(
2251 rename = "NSTimeout",
2252 serialize_with = "crate::serialize_option",
2253 skip_serializing_if = "Option::is_none"
2254 )]
2255 pub timeout: Option<String>,
2256 /// A service-specific string value.
2257 ///
2258 /// ## Availability
2259 /// * macOS 10.0+
2260 ///
2261 /// ## Framework
2262 /// * AppKit
2263 #[serde(
2264 rename = "NSUserData",
2265 serialize_with = "crate::serialize_option",
2266 skip_serializing_if = "Option::is_none"
2267 )]
2268 pub user_data: Option<BTreeMap<String, String>>,
2269}
2270
2271/// Default Dictionary
2272#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Eq, Default)]
2273pub struct DefaultDictionary {
2274 pub default: String,
2275}
2276
2277/// Complication Supported Families
2278#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Eq)]
2279pub enum ComplicationSupportedFamilies {
2280 #[serde(rename = "CLKComplicationFamilyModularSmall")]
2281 ModularSmall,
2282 #[serde(rename = "CLKComplicationFamilyModularLarge")]
2283 ModularLarge,
2284 #[serde(rename = "CLKComplicationFamilyUtilitarianSmall")]
2285 UtilitarianSmall,
2286 #[serde(rename = "CLKComplicationFamilyUtilitarianSmallFlat")]
2287 UtilitarianSmallFlat,
2288 #[serde(rename = "CLKComplicationFamilyUtilitarianLarge")]
2289 UtilitarianLarge,
2290 #[serde(rename = "CLKComplicationFamilyCircularSmall")]
2291 CircularSmall,
2292 #[serde(rename = "CLKComplicationFamilyExtraLarge")]
2293 ExtraLarge,
2294 #[serde(rename = "CLKComplicationFamilyGraphicCorner")]
2295 GraphicCorner,
2296 #[serde(rename = "CLKComplicationFamilyGraphicBezel")]
2297 GraphicBezel,
2298 #[serde(rename = "CLKComplicationFamilyGraphicCircular")]
2299 GraphicCircular,
2300 #[serde(rename = "CLKComplicationFamilyGraphicRectangular")]
2301 GraphicRectangular,
2302}
2303
2304/// Architecture Priority
2305#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Eq)]
2306pub enum ArchitecturePriority {
2307 /// The 32-bit Intel architecture.
2308 #[serde(rename = "i386")]
2309 I386,
2310 /// The 64-bit Intel architecture.
2311 #[serde(rename = "x86_64")]
2312 X86_64,
2313 /// The 64-bit ARM architecture.
2314 #[serde(rename = "arm64")]
2315 Arm64,
2316 /// The 64-bit ARM architecture with pointer authentication code support.
2317 #[serde(rename = "arm64e")]
2318 Arm64e,
2319}
2320
2321/// Device Capabilities
2322#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Eq)]
2323pub enum DeviceCapabilities {
2324 /// The presence of accelerometers. Use the Core Motion framework to receive
2325 /// accelerometer events. You don’t need to include this value if your app detects
2326 /// only device orientation changes. Available in iOS 3.0 and later.
2327 #[serde(rename = "accelerometer")]
2328 Accelerometer,
2329 /// Support for ARKit. Available in iOS 11.0 and later.
2330 #[serde(rename = "arkit")]
2331 Arkit,
2332 /// Compilation for the armv7 instruction set, or as a 32/64-bit universal app.
2333 /// Available in iOS 3.1 and later.
2334 #[serde(rename = "armv7")]
2335 Armv7,
2336 /// Compilation for the arm64 instruction set. Include this key for all 64-bit apps
2337 /// and embedded bundles, like extensions and frameworks. Available in iOS 8.0 and
2338 /// later.
2339 #[serde(rename = "arm64")]
2340 Arm64,
2341 /// Autofocus capabilities in the device’s still camera. You might need to include
2342 /// this value if your app supports macro photography or requires sharper images
2343 /// to perform certain image-processing tasks. Available in iOS 3.0 and later.
2344 #[serde(rename = "auto-focus-camera")]
2345 AutoFocusCamera,
2346 /// Bluetooth low-energy hardware. Available in iOS 5.0 and later.
2347 #[serde(rename = "bluetooth-le")]
2348 BluetoothLe,
2349 /// A camera flash. Use the cameraFlashMode property of a UIImagePickerController
2350 /// instance to control the camera’s flash. Available in iOS 3.0 and later.
2351 #[serde(rename = "camera-flash")]
2352 CameraFlash,
2353 /// A forward-facing camera. Use the cameraDevice property of a
2354 /// UIImagePickerController instance to select the device’s camera. Available in
2355 /// iOS 3.0 and later.
2356 #[serde(rename = "front-facing-camera")]
2357 FrontFacingCamera,
2358 /// Access to the Game Center service. Enable the Game Center capability in Xcode to
2359 /// add this value to your app. Available in iOS 4.1 and later.
2360 #[serde(rename = "gamekit")]
2361 Gamekit,
2362 /// GPS (or AGPS) hardware for tracking locations. If you include this value, you
2363 /// should also include the location-services value. Require GPS only if your app
2364 /// needs location data more accurate than the cellular or Wi-Fi radios provide.
2365 /// Available in iOS 3.0 and later.
2366 #[serde(rename = "gps")]
2367 Gps,
2368 /// A gyroscope. Use the Core Motion framework to retrieve information from gyroscope
2369 /// hardware. Available in iOS 3.0 and later.
2370 #[serde(rename = "gyroscope")]
2371 Gyroscope,
2372 /// Support for HealthKit. Available in iOS 8.0 and later.
2373 #[serde(rename = "healthkit")]
2374 Healthkit,
2375 /// Performance and capabilities of the A12 Bionic and later chips. Available in iOS
2376 /// 12.0 and later.
2377 #[serde(rename = "iphone-ipad-minimum-performance-a12")]
2378 IphoneIpadMinimumPerformanceA12,
2379 /// Access to the device’s current location using the Core Location framework. This
2380 /// value refers to the general location services feature. If you specifically
2381 /// need GPS-level accuracy, also include the gps feature. Available in iOS 3.0 and
2382 /// later.
2383 #[serde(rename = "location-services")]
2384 LocationServices,
2385 /// Magnetometer hardware. Apps use this hardware to receive heading-related events
2386 /// through the Core Location framework. Available in iOS 3.0 and later.
2387 #[serde(rename = "magnetometer")]
2388 Magnetometer,
2389 // Support for graphics processing with Metal. Available in iOS 8.0 and later.
2390 #[serde(rename = "metal")]
2391 Metal,
2392 /// The built-in microphone or accessories that provide a microphone. Available in iOS
2393 /// 3.0 and later.
2394 #[serde(rename = "microphone")]
2395 Microphone,
2396 /// Near Field Communication (NFC) tag detection and access to messages that contain
2397 /// NFC Data Exchange Format data. Use the Core NFC framework to detect and read
2398 /// NFC tags. Available in iOS 11.0 and later.
2399 #[serde(rename = "nfc")]
2400 Nfc,
2401 /// The OpenGL ES 1.1 interface. Available in iOS 3.0 and later.
2402 #[serde(rename = "opengles-1")]
2403 Opengles1,
2404 /// The OpenGL ES 2.0 interface. Available in iOS 3.0 and later.
2405 #[serde(rename = "opengles-2")]
2406 Opengles2,
2407 /// The OpenGL ES 3.0 interface. Available in iOS 7.0 and later.
2408 #[serde(rename = "opengles-2")]
2409 Opengles3,
2410 /// Peer-to-peer connectivity over a Bluetooth network. Available in iOS 3.1 and
2411 /// later.
2412 #[serde(rename = "peer-peer")]
2413 PeerPeer,
2414 /// The Messages app. You might require this feature if your app opens URLs with the
2415 /// sms scheme. Available in iOS 3.0 and later.
2416 #[serde(rename = "sms")]
2417 Sms,
2418 /// A camera on the device. Use the UIImagePickerController interface to capture
2419 /// images from the device’s still camera. Available in iOS 3.0 and later.
2420 #[serde(rename = "still-camera")]
2421 StillCamera,
2422 /// The Phone app. You might require this feature if your app opens URLs with the tel
2423 /// scheme. Available in iOS 3.0 and later.
2424 #[serde(rename = "telephony")]
2425 Telephony,
2426 /// A camera with video capabilities on the device. Use the UIImagePickerController
2427 /// interface to capture video from the device’s camera. Available in iOS 3.0 and
2428 /// later.
2429 #[serde(rename = "video-camera")]
2430 VideoCamera,
2431 /// Networking features related to Wi-Fi access. Available in iOS 3.0 and later.
2432 #[serde(rename = "wifi")]
2433 Wifi,
2434}