apple_bundle/info_plist/user_interface.rs
1//! # User Interface.
2//!
3//! Configure an app's scenes, storyboards, icons, fonts, and other user interface
4//! elements.
5//!
6//! You define the user interface that your app presents during normal operation with a
7//! combination of code and storyboards. However, the system needs to know a few things
8//! about your app’s user interface before execution begins. For example,
9//! on some platforms, you have to specify what device orientations your app supports and
10//! what the system should display while your app launches. You add keys to your app’s
11//! Information Property List file to control certain aspects of its user interface.
12//!
13//! ## Framework
14//! * Bundle Resources
15
16use serde::{Deserialize, Serialize};
17use std::{collections::BTreeMap, str::FromStr};
18
19/// Main User Interface
20#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Eq, Default)]
21pub struct MainUserInterface {
22 /// The information about the app's scene-based life-cycle support.
23 ///
24 /// The presence of this key indicates that the app supports scenes and does not
25 /// use an app delegate object to manage transitions to and from the foreground or
26 /// background.
27 ///
28 /// ## Availability
29 /// * iOS 13.0+
30 ///
31 /// ## Framework
32 /// * UIKit
33 #[serde(
34 rename = "UIApplicationSceneManifest",
35 serialize_with = "crate::serialize_option",
36 skip_serializing_if = "Option::is_none"
37 )]
38 pub application_scene_manifest: Option<ApplicationSceneManifest>,
39 /// The name of an app's storyboard resource file.
40 ///
41 /// ## Availability
42 /// * macOS 10.10+
43 ///
44 /// ## Framework
45 /// * Foundation
46 #[serde(
47 rename = "NSMainStoryboardFile",
48 serialize_with = "crate::serialize_option",
49 skip_serializing_if = "Option::is_none"
50 )]
51 pub main_storyboard_resource_file_base_name: Option<String>,
52 /// The name of the app’s main storyboard file.
53 ///
54 /// ## Availability
55 /// * iOS 5.0+
56 /// * tvOS 9.0+
57 ///
58 /// ## Framework
59 /// * UIKit
60 #[serde(
61 rename = "UIMainStoryboardFile",
62 serialize_with = "crate::serialize_option",
63 skip_serializing_if = "Option::is_none"
64 )]
65 pub main_storyboard_file_base_name: Option<String>,
66 /// The name of an app’s main user interface file.
67 ///
68 /// ## Availability
69 /// * iOS 2.0+
70 /// * macOS 10.0+
71 /// * tvOS 9.0+
72 /// * watchOS 2.0+
73 ///
74 /// ## Framework
75 /// * Foundation
76 #[serde(
77 rename = "NSMainNibFile",
78 serialize_with = "crate::serialize_option",
79 skip_serializing_if = "Option::is_none"
80 )]
81 pub main_nib_file_base_name: Option<String>,
82 /// A Boolean value indicating whether the app is an agent app that runs in the
83 /// background and doesn't appear in the Dock.
84 ///
85 /// ## Availability
86 /// * macOS 10.0+
87 ///
88 /// ## Framework
89 /// * Core Services
90 #[serde(
91 rename = "LSUIElement",
92 serialize_with = "crate::serialize_option",
93 skip_serializing_if = "Option::is_none"
94 )]
95 pub application_is_agent: Option<bool>,
96}
97
98/// Launch Interface
99#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Eq, Default)]
100pub struct LaunchInterface {
101 /// The user interface to show while an app launches.
102 ///
103 /// You use this key to define the launch screen that the system displays while your
104 /// app launches. If you need to provide different launch screens in response to
105 /// being launched by different URL schemes, use UILaunchScreens instead.
106 ///
107 /// ## Availability
108 /// * iOS 14.0+
109 ///
110 /// ## Framework
111 /// * SwiftUI
112 #[serde(
113 rename = "UILaunchScreen",
114 serialize_with = "crate::serialize_option",
115 skip_serializing_if = "Option::is_none"
116 )]
117 pub launch_screen: Option<LaunchScreen>,
118 /// The user interfaces to show while an app launches in response to different URL
119 /// schemes.
120 ///
121 /// You use this key if your app supports launching in response to one or more URL
122 /// schemes, and if you want to provide different launch screens for different
123 /// launch triggers. If you need only one launch screen, use UILaunchScreen
124 /// instead.
125 ///
126 /// To define launch screens, create an array of dictionaries, each similar to the one
127 /// you might provide for UILaunchScreen, but with an added
128 /// UILaunchScreenIdentifier key that uniquely identifies the screen. Store the
129 /// array as the value for the UILaunchScreenDefinitions key.
130 ///
131 /// To map from URL schemes to a launch screens, create a dictionary of schemes and
132 /// identifiers, and store it as the value for the UIURLToLaunchScreenAssociations
133 /// key. Additionally, indicate a default launch screen by setting a value for the
134 /// UIDefaultLaunchScreen key.
135 ///
136 /// ## Availability
137 /// * iOS 14.0+
138 ///
139 /// ## Framework
140 /// * SwiftUI
141 #[serde(
142 rename = "UILaunchScreens",
143 serialize_with = "crate::serialize_option",
144 skip_serializing_if = "Option::is_none"
145 )]
146 pub launch_screens: Option<LaunchScreens>,
147 /// The filename of the storyboard from which to generate the app’s launch image.
148 ///
149 /// Specify the name of the storyboard file without the filename extension. For
150 /// example, if the filename of your storyboard is LaunchScreen.storyboard,
151 /// specify "LaunchScreen" as the value for this key.
152 ///
153 /// If you prefer to configure your app’s launch screen without storyboards, use
154 /// UILaunchScreen instead.
155 ///
156 /// ## Availability
157 /// * iOS 14.0+
158 /// * tvOS 9.0+
159 /// * watchOS 2.0+
160 ///
161 /// ## Framework
162 /// * UIKit
163 #[serde(
164 rename = "UILaunchStoryboardName",
165 serialize_with = "crate::serialize_option",
166 skip_serializing_if = "Option::is_none"
167 )]
168 pub launch_storyboard_name: Option<String>,
169 /// The launch storyboards.
170 ///
171 /// ## Availability
172 /// * iOS 9.0+
173 ///
174 /// ## Framework
175 /// * UIKit
176 #[serde(
177 rename = "UILaunchStoryboards",
178 serialize_with = "crate::serialize_option",
179 skip_serializing_if = "Option::is_none"
180 )]
181 pub launch_storyboards: Option<LaunchStoryboards>,
182 /// The initial user-interface mode for the app.
183 ///
184 /// Possible Values: 0, 1, 2, 3, 4
185 ///
186 /// ## Availability
187 /// * macOS 10.0+
188 ///
189 /// ## Framework
190 /// * Core Services
191 #[serde(
192 rename = "LSUIPresentationMode",
193 serialize_with = "crate::serialize_option",
194 skip_serializing_if = "Option::is_none"
195 )]
196 pub presentation_mode: Option<u8>,
197}
198
199/// Icons
200#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Eq, Default)]
201pub struct Icons {
202 /// Information about all of the icons used by the app.
203 ///
204 /// ## Availability
205 /// * macOS 10.0+
206 /// * tvOS 9.0+
207 /// * watchOS 2.0+
208 ///
209 /// ## Framework
210 /// * Core Foundation
211 #[serde(
212 rename = "CFBundleIcons",
213 serialize_with = "crate::serialize_option",
214 skip_serializing_if = "Option::is_none"
215 )]
216 pub bundle_icons: Option<BundleIcons>,
217 /// The names of the bundle’s icon image files.
218 ///
219 /// ## Availability
220 /// * iOS 3.2+
221 /// * tvOS 9.0+
222 /// * watchOS 2.0+
223 ///
224 /// ## Framework
225 /// * Core Foundation
226 #[serde(
227 rename = "CFBundleIconFiles",
228 serialize_with = "crate::serialize_option",
229 skip_serializing_if = "Option::is_none"
230 )]
231 pub bundle_icon_files: Option<Vec<String>>,
232 /// The file containing the bundle's icon.
233 ///
234 /// ## Availability
235 /// * iOS 2.0+
236 /// * macOS 10.0+
237 /// * tvOS 9.0+
238 /// * watchOS 2.0+
239 ///
240 /// ## Framework
241 /// * Core Foundation
242 #[serde(
243 rename = "CFBundleIconFile",
244 serialize_with = "crate::serialize_option",
245 skip_serializing_if = "Option::is_none"
246 )]
247 pub bundle_icon_file: Option<String>,
248 /// The name of the asset that represents the app icon.
249 ///
250 /// ## Availability
251 /// * macOS 10.13+
252 ///
253 /// ## Framework
254 /// * Core Foundation
255 #[serde(
256 rename = "CFBundleIconName",
257 serialize_with = "crate::serialize_option",
258 skip_serializing_if = "Option::is_none"
259 )]
260 pub bundle_icon_name: Option<String>,
261 /// A Boolean value indicating whether the app’s icon already contains a shine effect.
262 ///
263 /// ## Availability
264 /// * iOS 2.0+
265 /// * tvOS 9.0+
266 /// * watchOS 2.0+
267 ///
268 /// ## Framework
269 /// * UIKit
270 #[serde(
271 rename = "UIPrerenderedIcon",
272 serialize_with = "crate::serialize_option",
273 skip_serializing_if = "Option::is_none"
274 )]
275 pub prerendered_icon: Option<bool>,
276}
277
278/// Orientation
279#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Eq, Default)]
280pub struct Orientation {
281 /// The initial orientation of the app’s user interface.
282 ///
283 /// ## Availability
284 /// * iOS 2.0+
285 ///
286 /// ## Framework
287 /// * UIKit
288 #[serde(
289 rename = "UIInterfaceOrientation",
290 skip_serializing_if = "Option::is_none",
291 serialize_with = "crate::serialize_enum_option"
292 )]
293 pub interface_orientation: Option<InterfaceOrientation>,
294 /// The initial orientation of the app’s user interface.
295 ///
296 /// ## Availability
297 /// * iOS 3.2+
298 ///
299 /// ## Framework
300 /// * UIKit
301 #[serde(
302 rename = "UISupportedInterfaceOrientations",
303 skip_serializing_if = "Option::is_none",
304 serialize_with = "crate::serialize_vec_enum_option"
305 )]
306 pub supported_interface_orientations: Option<Vec<InterfaceOrientation>>,
307}
308
309/// Styling
310#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Eq, Default)]
311pub struct Styling {
312 /// The user interface style for the app.
313 ///
314 /// ## Availability
315 /// * iOS 13.0+
316 /// * tvOS 10.0+
317 ///
318 /// ## Framework
319 /// * UIKit
320 #[serde(
321 rename = "UIUserInterfaceStyle",
322 skip_serializing_if = "Option::is_none",
323 serialize_with = "crate::serialize_enum_option"
324 )]
325 pub user_interface_style: Option<UserInterfaceStyle>,
326 /// A Boolean value indicating whether Core Animation layers use antialiasing when
327 /// drawing a layer that's not aligned to pixel boundaries.
328 ///
329 /// ## Availability
330 /// * iOS 3.0+
331 /// * tvOS 9.0+
332 /// * watchOS 2.0+
333 ///
334 /// ## Framework
335 /// * UIKit
336 #[serde(
337 rename = "UIViewEdgeAntialiasing",
338 serialize_with = "crate::serialize_option",
339 skip_serializing_if = "Option::is_none"
340 )]
341 pub view_edge_antialiasing: Option<bool>,
342 /// The app’s white point adaptivity style, enabled on devices with True Tone
343 /// displays.
344 ///
345 /// ## Availability
346 /// * iOS 9.3+
347 ///
348 /// ## Framework
349 /// * UIKit
350 #[serde(
351 rename = "UIWhitePointAdaptivityStyle",
352 skip_serializing_if = "Option::is_none",
353 serialize_with = "crate::serialize_enum_option"
354 )]
355 pub white_point_adaptivity_style: Option<WhitePointAdaptivityStyle>,
356 /// A Boolean value indicating whether Core Animation sublayers inherit the opacity of
357 /// their superlayer.
358 ///
359 /// ## Availability
360 /// * iOS 3.0+
361 /// * tvOS 9.0+
362 /// * watchOS 2.0+
363 ///
364 /// ## Framework
365 /// * UIKit
366 #[serde(
367 rename = "UIViewGroupOpacity",
368 serialize_with = "crate::serialize_option",
369 skip_serializing_if = "Option::is_none"
370 )]
371 pub view_group_opacity: Option<bool>,
372 /// A Boolean value indicating whether the app requires fullscreen or not.
373 ///
374 /// ## Availability
375 /// * iOS 9.0+
376 ///
377 /// ## Framework
378 /// * UIKit
379 #[serde(
380 rename = "UIRequiresFullScreen",
381 serialize_with = "crate::serialize_option",
382 skip_serializing_if = "Option::is_none"
383 )]
384 pub requires_full_screen: Option<bool>,
385 /// The name of a color in an asset catalog to use for a target’s global accent color.
386 ///
387 /// This Info.plist value controls the global tint color (iOS and watchOS) or accent
388 /// color (macOS) for the target. When set in a widget extension, the widget
389 /// configuration user interface uses this color as the tint color while editing a
390 /// widget.
391 ///
392 /// While you can set this directly in your Info.plist, the recommended approach is to
393 /// use the Global Accent Color Name build setting (in the Asset Catalog Compiler
394 /// - Options section) of the target. Set the value of the build setting to the
395 /// name of the Color Set in the asset catalog. Xcode automatically sets
396 /// NSAccentColorName to the appropriate value in the Info.plist file when
397 /// building your project.
398 ///
399 /// ## Availability
400 /// * iOS 14.0+
401 /// * macOS 11.0+
402 /// * tvOS 14.0+
403 /// * watchOS 7.0+
404 ///
405 /// ## Framework
406 /// * Foundation
407 #[serde(
408 rename = "NSAccentColorName",
409 serialize_with = "crate::serialize_option",
410 skip_serializing_if = "Option::is_none"
411 )]
412 pub accent_color_name: Option<String>,
413 /// The name of a color in an asset catalog to use for a widget’s configuration
414 /// interface.
415 ///
416 /// This Info.plist value controls the background color shown in the widget
417 /// configuration interface while editing a widget.
418 ///
419 /// While you can set this directly in your Info.plist, the recommended approach is to
420 /// use the Widget Background Color Name build setting (in the Asset Catalog
421 /// Compiler - Options section) of the widget extension target. Set the value
422 /// of the build setting to the name of the Color Set in the asset catalog. Xcode
423 /// automatically sets NSWidgetBackgroundColorName to the appropriate value in the
424 /// Info.plist file when building your project.
425 ///
426 /// ## Availability
427 /// * iOS 14.0+
428 /// * macOS 11.0+
429 ///
430 /// ## Framework
431 /// * WidgetKit
432 #[serde(
433 rename = "NSWidgetBackgroundColorName",
434 serialize_with = "crate::serialize_option",
435 skip_serializing_if = "Option::is_none"
436 )]
437 pub widget_background_color_name: Option<String>,
438}
439
440/// Fonts
441#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Eq, Default)]
442pub struct Fonts {
443 /// The location of a font file or directory of fonts in the bundle’s Resources
444 /// folder.
445 ///
446 /// ## Availability
447 /// * macOS 10.0+
448 ///
449 /// ## Framework
450 /// * AppKit
451 #[serde(
452 rename = "ATSApplicationFontsPath",
453 serialize_with = "crate::serialize_option",
454 skip_serializing_if = "Option::is_none"
455 )]
456 pub application_fonts_path: Option<String>,
457 /// App-specific font files located in the bundle and that the system loads at
458 /// runtime.
459 ///
460 /// ## Availability
461 /// * iOS 3.2+
462 /// * tvOS 9.0+
463 /// * watchOS 2.0+
464 ///
465 /// ## Framework
466 /// * UIKit
467 #[serde(
468 rename = "UIAppFonts",
469 serialize_with = "crate::serialize_option",
470 skip_serializing_if = "Option::is_none"
471 )]
472 pub app_fonts: Option<Vec<String>>,
473}
474
475/// Status Bar
476#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Default)]
477pub struct StatusBar {
478 /// A Boolean value indicating whether the status bar is initially hidden when the app
479 /// launches.
480 ///
481 /// ## Availability
482 /// * iOS 2.0+
483 ///
484 /// ## Framework
485 /// * UIKit
486 #[serde(
487 rename = "UIStatusBarHidden",
488 serialize_with = "crate::serialize_option",
489 skip_serializing_if = "Option::is_none"
490 )]
491 pub status_bar_hidden: Option<bool>,
492 /// The style of the status bar as the app launches.
493 ///
494 /// ## Availability
495 /// * iOS 2.0+
496 ///
497 /// ## Framework
498 /// * UIKit
499 #[serde(
500 rename = "UIStatusBarStyle",
501 skip_serializing_if = "Option::is_none",
502 serialize_with = "crate::serialize_enum_option"
503 )]
504 pub status_bar_style: Option<StatusBarStyle>,
505 /// The status bar tint.
506 ///
507 /// ## Availability
508 /// * iOS 2.0+
509 /// * tvOS 9.0+
510 /// * watchOS 2.0+
511 ///
512 /// ## Framework
513 /// * UIKit
514 #[serde(
515 rename = "UIStatusBarTintParameters",
516 serialize_with = "crate::serialize_option",
517 skip_serializing_if = "Option::is_none"
518 )]
519 pub status_bar_tint_parameters: Option<StatusBarTintParameters>,
520 /// A Boolean value indicating whether the status bar appearance is based on the style
521 /// preferred for the current view controller.
522 ///
523 /// ## Availability
524 /// * iOS 2.0+
525 ///
526 /// ## Framework
527 /// * UIKit
528 #[serde(
529 rename = "UIViewControllerBasedStatusBarAppearance",
530 serialize_with = "crate::serialize_option",
531 skip_serializing_if = "Option::is_none"
532 )]
533 pub view_controller_based_status_bar_appearance: Option<bool>,
534}
535
536/// Preferences
537#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Eq, Default)]
538pub struct Preferences {
539 /// The name of an image file used to represent a preference pane in the System
540 /// Preferences app.
541 ///
542 /// ## Availability
543 /// * macOS 10.1+
544 ///
545 /// ## Framework
546 /// * Preference Panes
547 #[serde(
548 rename = "NSPrefPaneIconFile",
549 serialize_with = "crate::serialize_option",
550 skip_serializing_if = "Option::is_none"
551 )]
552 pub pref_pane_icon_file: Option<String>,
553 /// The name of a preference pane displayed beneath the preference pane icon in the
554 /// System Preferences app.
555 ///
556 /// ## Availability
557 /// * macOS 10.1+
558 ///
559 /// ## Framework
560 /// * Preference Panes
561 #[serde(
562 rename = "NSPrefPaneIconLabel",
563 serialize_with = "crate::serialize_option",
564 skip_serializing_if = "Option::is_none"
565 )]
566 pub pref_pane_icon_label: Option<String>,
567}
568
569/// Graphics
570#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Eq, Default)]
571pub struct Graphics {
572 /// A Boolean value indicating whether the app supports HDR mode on Apple TV 4K.
573 ///
574 /// ## Availability
575 /// * tvOS 11.2+
576 ///
577 /// ## Framework
578 /// * UIKit
579 #[serde(
580 rename = "UIAppSupportsHDR",
581 serialize_with = "crate::serialize_option",
582 skip_serializing_if = "Option::is_none"
583 )]
584 pub app_supports_hdr: Option<bool>,
585 /// A Boolean value indicating whether the Cocoa app supports high-resolution
586 /// displays.
587 ///
588 /// ## Availability
589 /// * iOS 2.0+
590 /// * macOS 10.0+
591 /// * tvOS 9.0+
592 /// * watchOS 2.0+
593 ///
594 /// ## Framework
595 /// * Foundation
596 #[serde(
597 rename = "NSHighResolutionCapable",
598 serialize_with = "crate::serialize_option",
599 skip_serializing_if = "Option::is_none"
600 )]
601 pub high_resolution_capable: Option<bool>,
602 /// A Boolean value indicating whether an OpenGL app may utilize the integrated GPU.
603 ///
604 /// ## Availability
605 /// * macOS 10.7+
606 ///
607 /// ## Framework
608 /// * Foundation
609 #[serde(
610 rename = "NSSupportsAutomaticGraphicsSwitching",
611 serialize_with = "crate::serialize_option",
612 skip_serializing_if = "Option::is_none"
613 )]
614 pub supports_automatic_graphics_switching: Option<bool>,
615 /// The preferred system action when an external GPU is connected from the system.
616 ///
617 /// ## Availability
618 /// * macOS 10.14+
619 ///
620 /// ## Framework
621 /// * Metal
622 #[serde(
623 rename = "GPUEjectPolicy",
624 skip_serializing_if = "Option::is_none",
625 serialize_with = "crate::serialize_enum_option"
626 )]
627 pub gpu_eject_policy: Option<GpuEjectPolicy>,
628 /// The app's preference for whether it wants to use external graphics processors.
629 ///
630 /// ## Availability
631 /// * macOS 10.14+
632 ///
633 /// ## Framework
634 /// * Metal
635 #[serde(
636 rename = "GPUSelectionPolicy",
637 skip_serializing_if = "Option::is_none",
638 serialize_with = "crate::serialize_enum_option"
639 )]
640 pub gpu_selection_policy: Option<GpuSelectionPolicy>,
641}
642
643/// Quick Look
644#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Default)]
645pub struct QuickLook {
646 /// A Boolean value indicating whether a Quick Look app's generator can be run in
647 /// threads other than the main thread.
648 ///
649 /// ## Availability
650 /// * iOS 4.0+
651 /// * macOS 10.5+
652 ///
653 /// ## Framework
654 /// * QuickLook
655 #[serde(
656 rename = "QLNeedsToBeRunInMainThread",
657 serialize_with = "crate::serialize_option",
658 skip_serializing_if = "Option::is_none"
659 )]
660 pub needs_to_be_run_in_main_thread: Option<bool>,
661 /// A hint at the height, in points, of a Quick Look app's previews.
662 ///
663 /// ## Availability
664 /// * iOS 4.0+
665 /// * macOS 10.5+
666 ///
667 /// ## Framework
668 /// * QuickLook
669 #[serde(
670 rename = "QLPreviewHeight",
671 serialize_with = "crate::serialize_option",
672 skip_serializing_if = "Option::is_none"
673 )]
674 pub preview_height: Option<f32>,
675 /// A hint at the width, in points, of a Quick Look app's previews.
676 ///
677 /// ## Availability
678 /// * iOS 4.0+
679 /// * macOS 10.5+
680 ///
681 /// ## Framework
682 /// * QuickLook
683 #[serde(
684 rename = "QLPreviewWidth",
685 serialize_with = "crate::serialize_option",
686 skip_serializing_if = "Option::is_none"
687 )]
688 pub preview_width: Option<f32>,
689 /// A Boolean value indicating whether a Quick Look app's generator can handle
690 /// concurrent thumbnail and preview requests.
691 ///
692 /// ## Availability
693 /// * iOS 4.0+
694 /// * macOS 10.5+
695 ///
696 /// ## Framework
697 /// * QuickLook
698 #[serde(
699 rename = "QLSupportsConcurrentRequests",
700 serialize_with = "crate::serialize_option",
701 skip_serializing_if = "Option::is_none"
702 )]
703 pub supports_concurrent_requests: Option<bool>,
704 /// The minimum size, in points, along one dimension of thumbnails for a Quick Look
705 /// app's generator.
706 ///
707 /// ## Availability
708 /// * iOS 4.0+
709 /// * macOS 10.5+
710 ///
711 /// ## Framework
712 /// * QuickLook
713 #[serde(
714 rename = "QLThumbnailMinimumSize",
715 serialize_with = "crate::serialize_option",
716 skip_serializing_if = "Option::is_none"
717 )]
718 pub thumbnail_minimum_size: Option<f32>,
719}
720
721/// Deprecated Keys
722#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Eq, Default)]
723pub struct DeprecatedKeys {
724 /// A dictionary containing information about launch images.
725 ///
726 /// ## Availability
727 /// * iOS 7.0–13.0
728 /// * tvOS 9.0–13.0
729 ///
730 /// ## Framework
731 /// * UIKit
732 #[deprecated(
733 since = "iOS 7.0-13.0, tvOS 9.0-13.0",
734 note = "UILaunchImages has been deprecated; use Xcode launch storyboards instead."
735 )]
736 #[serde(
737 rename = "UILaunchImages",
738 serialize_with = "crate::serialize_option",
739 skip_serializing_if = "Option::is_none"
740 )]
741 pub launch_images: Option<Vec<LaunchImage>>,
742}
743
744/// Default Dictionary
745#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Eq, Default)]
746pub struct LaunchImage {
747 pub default: String,
748}
749
750/// GPU Eject Policy
751#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Eq)]
752pub enum GpuEjectPolicy {
753 /// Set this value to allow macOS to quit and relaunch your app with another GPU.
754 /// Your app can implement the application(_:willEncodeRestorableState:) method to
755 /// save any state before it quits, and it can implement the
756 /// application(_:didDecodeRestorableState:) method to restore any saved state
757 /// after it relaunches.
758 #[serde(rename = "relaunch")]
759 Relaunch,
760 /// Set this value to manually respond to the safe disconnect request. Your app must
761 /// register and respond to the removalRequested notification posted by Metal.
762 /// macOS waits for your app to remove all references to the external GPU before
763 /// notifying the user that it's safe to disconnect the GPU.
764 #[serde(rename = "wait")]
765 Wait,
766 /// Set this value to allow macOS to force your app to quit.
767 #[serde(rename = "kill")]
768 Kill,
769 /// Tells the system to ignore the disconnect message. Don’t use this key in new macOS
770 /// apps.
771 #[serde(rename = "ignore")]
772 Ignore,
773}
774
775/// GPU Selection Policy
776#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Eq)]
777pub enum GpuSelectionPolicy {
778 /// Metal tries to avoid creating contexts on external GPUs. For legacy OpenGL apps,
779 /// OpenGL also avoids creating contexts using external GPUs. Set this option only
780 /// if your app doesn't support external GPU event handling.
781 #[serde(rename = "avoidRemovable")]
782 AvoidRemovable,
783 /// If external GPUs are visible to the system, Metal prefers them over other GPUs.
784 /// Similarly, for legacy OpenGL apps, OpenGL also prefers to create contexts on
785 /// the external GPU.
786 #[serde(rename = "preferRemovable")]
787 PreferRemovable,
788}
789
790/// NavigationBar
791#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Default)]
792pub struct StatusBarTintParameters {
793 /// The initial navigation bar’s style and translucency.
794 ///
795 /// ## Availability
796 /// * iOS 2.0+
797 /// * tvOS 9.0+
798 /// * watchOS 2.0+
799 ///
800 /// ## Framework
801 /// * UIKit
802 #[serde(
803 rename = "UINavigationBar",
804 serialize_with = "crate::serialize_option",
805 skip_serializing_if = "Option::is_none"
806 )]
807 pub navigation_bar: Option<NavigationBar>,
808}
809
810/// Navigation Bar
811#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Default)]
812pub struct NavigationBar {
813 #[serde(rename = "BackgroundImage")]
814 pub background_image: String,
815 #[serde(rename = "Style")]
816 pub style: BarStyle,
817 #[serde(rename = "Translucent")]
818 pub translucent: bool,
819 /// The tint color to apply to the background of the navigation bar.
820 ///
821 /// ## Availability
822 /// * iOS 2.0+
823 /// * tvOS 9.0+
824 /// * watchOS 2.0+
825 ///
826 /// ## Framework
827 /// * UIKit
828 #[serde(
829 rename = "TintColor",
830 serialize_with = "crate::serialize_option",
831 skip_serializing_if = "Option::is_none"
832 )]
833 pub tint_color: Option<TintColor>,
834}
835
836/// Bar Style
837#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Eq, Default)]
838pub enum BarStyle {
839 #[serde(rename = "UIBarStyleDefault")]
840 #[default]
841 Default,
842 #[serde(rename = "UIBarStyleBlack")]
843 Black,
844}
845
846/// Tint Color
847#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Default)]
848pub struct TintColor {
849 #[serde(rename = "Blue")]
850 pub blue: f32,
851 #[serde(rename = "Green")]
852 pub green: f32,
853 #[serde(rename = "Red")]
854 pub red: f32,
855}
856
857/// Status Bar Style
858#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Eq)]
859pub enum StatusBarStyle {
860 #[serde(rename = "UIStatusBarStyleDefault")]
861 Default,
862 #[serde(rename = "UIStatusBarStyleBlackTranslucent")]
863 BlackTranslucent,
864 #[serde(rename = "UIStatusBarStyleBlackOpaque")]
865 BlackOpaque,
866}
867
868/// White Point Adaptivity Style
869#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Eq)]
870pub enum WhitePointAdaptivityStyle {
871 #[serde(rename = "UIWhitePointAdaptivityStyleStandard")]
872 Standard,
873 #[serde(rename = "UIWhitePointAdaptivityStyleReading")]
874 Reading,
875 #[serde(rename = "UIWhitePointAdaptivityStylePhoto")]
876 Photo,
877 #[serde(rename = "UIWhitePointAdaptivityStyleVideo")]
878 Video,
879 #[serde(rename = "UIWhitePointAdaptivityStyleGame")]
880 Game,
881}
882
883/// User Interface Style
884#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Eq)]
885pub enum UserInterfaceStyle {
886 /// Set this value to adopt the systemwide user interface style, and observe any
887 /// changes to that style. This is the default value, and provides the same
888 /// functionality as if the key weren’t explicitly set.
889 Automatic,
890 /// Set this value to force the light user interface style, even when the systemwide
891 /// style is set to dark. Your app will ignore any changes to the systemwide
892 /// style.
893 Light,
894 /// Set this value to force the dark user interface style, even when the systemwide
895 /// style is set to light. Your app will ignore any changes to the systemwide
896 /// style.
897 Dark,
898}
899
900/// Interface Orientation
901#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Eq)]
902pub enum InterfaceOrientation {
903 /// The app supports the display in portrait mode, with the device upright and the
904 /// front camera at the top.
905 #[serde(rename = "UIInterfaceOrientationPortrait")]
906 Portrait,
907 /// The app supports the display in portrait mode but is upside down, with the device
908 /// upright and the front camera at the bottom. UIViewController ignores this
909 /// option on devices without a Home button.
910 #[serde(rename = "UIInterfaceOrientationPortraitUpsideDown")]
911 PortraitUpsideDown,
912 /// The app supports the display in landscape mode, with the device upright and the
913 /// front camera on the left.
914 #[serde(rename = "UIInterfaceOrientationLandscapeLeft")]
915 LandscapeLeft,
916 /// The app supports the display in landscape mode, with the device upright and the
917 /// front camera on the right.
918 #[serde(rename = "UIInterfaceOrientationLandscapeRight")]
919 LandscapeRight,
920}
921
922impl FromStr for InterfaceOrientation {
923 type Err = Box<dyn std::error::Error>;
924
925 fn from_str(s: &str) -> Result<InterfaceOrientation, Self::Err> {
926 match s {
927 "portrait" => Ok(InterfaceOrientation::Portrait),
928 "portrait-upside-down" => Ok(InterfaceOrientation::PortraitUpsideDown),
929 "landscape-left" => Ok(InterfaceOrientation::LandscapeLeft),
930 "landscape-right" => Ok(InterfaceOrientation::LandscapeRight),
931 _ => Err(s.into()),
932 }
933 }
934}
935
936/// Bundle Icons
937#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Eq, Default)]
938pub struct BundleIcons {
939 ///
940 /// ## Availability
941 /// * iOS 5.0+
942 /// * tvOS 9.0+
943 /// * watchOS 2.0+
944 ///
945 /// ## Framework
946 /// * Core Foundation
947 #[serde(
948 rename = "CFBundleAlternateIcons",
949 serialize_with = "crate::serialize_option",
950 skip_serializing_if = "Option::is_none"
951 )]
952 pub bundle_alternate_icons: Option<BTreeMap<String, AppIconReferenceName>>,
953 /// The primary icon for the Home screen and Settings app, among others.
954 ///
955 /// ## Availability
956 /// * iOS 5.0+
957 /// * tvOS 9.0+
958 /// * watchOS 2.0+
959 ///
960 /// ## Framework
961 /// * Core Foundation
962 #[serde(rename = "CFBundlePrimaryIcon")]
963 pub bundle_primary_icon: BundlePrimaryIcon,
964}
965
966/// App Icon Reference Name
967#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Eq, Default)]
968pub struct AppIconReferenceName {
969 #[serde(
970 rename = "CFBundleIconFiles",
971 serialize_with = "crate::serialize_option",
972 skip_serializing_if = "Option::is_none"
973 )]
974 pub bundle_icon_files: Option<Vec<String>>,
975 #[serde(
976 rename = "UIPrerenderedIcon",
977 serialize_with = "crate::serialize_option",
978 skip_serializing_if = "Option::is_none"
979 )]
980 pub prerendered_icon: Option<bool>,
981}
982
983/// Bundle Primary Icon
984#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Eq, Default)]
985pub struct BundlePrimaryIcon {
986 /// The names of a bundle’s icon files.
987 ///
988 /// ## Availability
989 /// * iOS 3.2+
990 /// * tvOS 9.0+
991 /// * watchOS 2.0+
992 ///
993 /// ## Framework
994 /// * Core Foundation
995 #[serde(rename = "CFBundleIconFiles")]
996 pub bundle_icon_files: Vec<String>,
997 /// The name of a symbol from SF Symbols.
998 ///
999 /// Action extensions use template images for their icons. To use a symbol from SF
1000 /// Symbols as the icon, set the value of CFBundleSymbolName to the symbol’s name.
1001 ///
1002 /// ## Availability
1003 /// * iOS 13.0+
1004 ///
1005 /// ## Framework
1006 /// * Core Foundation
1007 #[serde(
1008 rename = "CFBundleSymbolName",
1009 serialize_with = "crate::serialize_option",
1010 skip_serializing_if = "Option::is_none"
1011 )]
1012 pub bundle_symbol_name: Option<String>,
1013 /// A Boolean value indicating whether the icon files already incorporate a shine
1014 /// effect.
1015 ///
1016 /// ## Availability
1017 /// * iOS 2.0+
1018 /// * tvOS 9.0+
1019 /// * watchOS 2.0+
1020 ///
1021 /// ## Framework
1022 /// * UIKit
1023 #[serde(rename = "UIPrerenderedIcon")]
1024 pub prerendered_icon: bool,
1025}
1026
1027/// Launch Screen
1028#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Eq, Default)]
1029pub struct LaunchScreen {
1030 // Main Interface.
1031 /// The name of a color to use as the background color on the launch screen.
1032 ///
1033 /// Provide a value for this key that’s the name of a color in your asset catalog.
1034 /// You use the same string for the value that you might use when calling the
1035 /// init(named:) initializer of UIColor.
1036 ///
1037 /// If you don’t set a color, the system uses a default of systemBackground, which
1038 /// varies according to whether the user has selected the light appearance or Dark
1039 /// Mode for the device.
1040 ///
1041 /// ## Availability
1042 /// * iOS 14.0+
1043 ///
1044 /// ## Framework
1045 /// * SwiftUI
1046 #[serde(
1047 rename = "UIColorName",
1048 serialize_with = "crate::serialize_option",
1049 skip_serializing_if = "Option::is_none"
1050 )]
1051 pub color_name: Option<String>,
1052 /// The name of an image to display during app launch.
1053 ///
1054 /// Provide a value for this key that’s the name of an image in your asset catalog.
1055 /// You use the same string for the value that you might use when calling the
1056 /// init(named:) initializer of UIImage. Because the image comes from your asset
1057 /// catalog, you can use slicing to provide a small image that works on many different
1058 /// platforms.
1059 ///
1060 /// If you don’t specify an image, the display shows the background color, as given by
1061 /// the UIColorName key. The background color may also show through any
1062 /// transparency in your image.
1063 ///
1064 /// ## Availability
1065 /// * iOS 14.0+
1066 ///
1067 /// ## Framework
1068 /// * SwiftUI
1069 #[serde(
1070 rename = "UIImageName",
1071 serialize_with = "crate::serialize_option",
1072 skip_serializing_if = "Option::is_none"
1073 )]
1074 pub image_name: Option<String>,
1075 /// A Boolean that specifies whether the launch image should respect the safe area
1076 /// insets.
1077 ///
1078 /// ## Availability
1079 /// * iOS 14.0+
1080 ///
1081 /// ## Framework
1082 /// * SwiftUI
1083 #[serde(
1084 rename = "UIImageRespectsSafeAreaInsets",
1085 serialize_with = "crate::serialize_option",
1086 skip_serializing_if = "Option::is_none"
1087 )]
1088 pub image_respects_safe_area_insets: Option<bool>,
1089 // Border Elements.
1090 /// Navigation bar visibility and configuration during launch.
1091 ///
1092 /// When you provide a dictionary for this key, the system displays a navigation bar
1093 /// during launch. You can optionally set the dictionary’s UIImageName key to
1094 /// define a custom image for the navigation bar.
1095 ///
1096 /// Omit this key if you don’t want to display a navigation bar during launch.
1097 ///
1098 /// ## Availability
1099 /// * iOS 14.0+
1100 ///
1101 /// ## Framework
1102 /// * SwiftUI
1103 #[serde(
1104 rename = "UINavigationBar",
1105 serialize_with = "crate::serialize_option",
1106 skip_serializing_if = "Option::is_none"
1107 )]
1108 pub navigation_bar: Option<Bar>,
1109 /// Tab bar visibility and configuration during launch.
1110 ///
1111 /// When you provide a dictionary for this key, the system displays a tab bar during
1112 /// launch. You can optionally set the dictionary’s UIImageName key to define a
1113 /// custom image for the tab bar.
1114 ///
1115 /// Omit this key if you don’t want to display a tab bar during launch.
1116 ///
1117 /// ## Availability
1118 /// * iOS 14.0+
1119 ///
1120 /// ## Framework
1121 /// * SwiftUI
1122 #[serde(
1123 rename = "UITabBar",
1124 serialize_with = "crate::serialize_option",
1125 skip_serializing_if = "Option::is_none"
1126 )]
1127 pub tab_bar: Option<Bar>,
1128 /// When you provide a dictionary for this key, the system displays a toolbar during
1129 /// launch. You can optionally set the dictionary’s UIImageName key to define a
1130 /// custom image for the toolbar.
1131 ///
1132 /// Omit this key if you don’t want to display a toolbar during launch.
1133 ///
1134 /// ## Availability
1135 /// * iOS 14.0+
1136 ///
1137 /// ## Framework
1138 /// * SwiftUI
1139 #[serde(
1140 rename = "UIToolbar",
1141 serialize_with = "crate::serialize_option",
1142 skip_serializing_if = "Option::is_none"
1143 )]
1144 pub toolbar: Option<Bar>,
1145}
1146
1147/// Application Scene Manifest
1148#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Eq, Default)]
1149pub struct Bar {
1150 /// A custom image that replaces the navigation/tab/tool bar during launch.
1151 ///
1152 /// Provide a value for this key that’s the name of an image in your asset catalog.
1153 /// You use the same string for the value that you might use when calling the
1154 /// init(named:) initializer of UIImage.
1155 ///
1156 /// ## Availability
1157 /// * iOS 14.0+
1158 ///
1159 /// ## Framework
1160 /// * SwiftUI
1161 #[serde(
1162 rename = "UIImageName",
1163 serialize_with = "crate::serialize_option",
1164 skip_serializing_if = "Option::is_none"
1165 )]
1166 pub image_name: Option<String>,
1167}
1168
1169/// Launch Screens
1170#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Eq, Default)]
1171pub struct LaunchScreens {
1172 // Launch Screen Definitions.
1173 /// A collection of launch screen configuration dictionaries.
1174 ///
1175 /// Each dictionary in the array resembles the one you might define for the
1176 /// UILaunchScreen key, with the addition of a UILaunchScreenIdentifier key that
1177 /// provides a unique identifier for the dictionary. You use that identifier when
1178 /// associating to the dictionary with a URL scheme in the
1179 /// UIURLToLaunchScreenAssociations array, or to indicate it as the default launch
1180 /// screen with the UIDefaultLaunchScreen key.
1181 ///
1182 /// ## Availability
1183 /// * iOS 14.0+
1184 ///
1185 /// ## Framework
1186 /// * SwiftUI
1187 #[serde(
1188 rename = "UILaunchScreenDefinitions",
1189 serialize_with = "crate::serialize_option",
1190 skip_serializing_if = "Option::is_none"
1191 )]
1192 pub launch_screen_definitions: Option<LaunchScreenDefinitions>,
1193 // Associations.
1194 /// The mapping of URL schemes to launch screen configurations.
1195 ///
1196 /// Set the keys of this dictionary to the URL schemes that your app supports.
1197 /// Provide a value for each key that is the identifier, stored in the
1198 /// UILaunchScreenIdentifier key, of one of the launch screen definitions in your
1199 /// UILaunchScreenDefinitions array.
1200 ///
1201 /// Any Key - A URL scheme. Set one of the configuration identifiers as the value.
1202 ///
1203 /// ## Availability
1204 /// * iOS 14.0+
1205 ///
1206 /// ## Framework
1207 /// * SwiftUI
1208 #[serde(
1209 rename = "UIURLToLaunchScreenAssociations",
1210 serialize_with = "crate::serialize_option",
1211 skip_serializing_if = "Option::is_none"
1212 )]
1213 pub url_to_launch_screen_associations: Option<BTreeMap<String, String>>,
1214 /// The default launch screen configuration.
1215 ///
1216 /// Provide the identifier, stored in the UILaunchScreenIdentifier key, of one of the
1217 /// launch screen definitions in your UILaunchScreenDefinitions array. The system
1218 /// displays the named launch screen when launching your app in response to a URL
1219 /// scheme that you don’t enumerate in the UIURLToLaunchStoryboardAssociations
1220 /// dictionary, or when the user launches your app directly.
1221 ///
1222 /// ## Availability
1223 /// * iOS 14.0+
1224 ///
1225 /// ## Framework
1226 /// * SwiftUI
1227 #[serde(
1228 rename = "UIDefaultLaunchScreen",
1229 serialize_with = "crate::serialize_option",
1230 skip_serializing_if = "Option::is_none"
1231 )]
1232 pub default_launch_screen: Option<String>,
1233}
1234
1235/// Launch Screen Definitions
1236#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Eq, Default)]
1237pub struct LaunchScreenDefinitions {
1238 /// A unique name for the launch screen configuration.
1239 ///
1240 /// You can choose any name you want for the identifier, as long as it’s unique among
1241 /// all your app’s configuration identifiers. Use this value to refer to the
1242 /// configuration when storing a URL to configuration mapping as the value for the
1243 /// UIURLToLaunchScreenAssociations key, or when specifying a default configuration
1244 /// with the UIDefaultLaunchScreen key.
1245 #[serde(
1246 rename = "UIColorName",
1247 serialize_with = "crate::serialize_option",
1248 skip_serializing_if = "Option::is_none"
1249 )]
1250 pub color_name: Option<String>,
1251 /// Launch Storyboards.
1252 ///
1253 /// ## Availability
1254 /// * iOS 14.0+
1255 ///
1256 /// ## Framework
1257 /// * SwiftUI
1258 #[serde(flatten)]
1259 pub launch_screen: LaunchScreen,
1260}
1261
1262/// Launch Storyboards
1263#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Eq, Default)]
1264pub struct LaunchStoryboards {
1265 #[serde(
1266 rename = "UIDefaultLaunchStoryboard",
1267 serialize_with = "crate::serialize_option",
1268 skip_serializing_if = "Option::is_none"
1269 )]
1270 pub default_launch_storyboard: Option<String>,
1271 #[serde(
1272 rename = "UILaunchStoryboardDefinitions",
1273 serialize_with = "crate::serialize_option",
1274 skip_serializing_if = "Option::is_none"
1275 )]
1276 pub launch_storyboard_definitions: Option<Vec<LaunchStoryboardDefinition>>,
1277 #[serde(
1278 rename = "UIURLToLaunchStoryboardAssociations",
1279 serialize_with = "crate::serialize_option",
1280 skip_serializing_if = "Option::is_none"
1281 )]
1282 pub url_to_launch_storyboard_associations: Option<BTreeMap<String, String>>,
1283}
1284
1285/// Launch Storyboard Definition
1286#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Eq, Default)]
1287pub struct LaunchStoryboardDefinition {
1288 #[serde(
1289 rename = "UILaunchStoryboardFile",
1290 serialize_with = "crate::serialize_option",
1291 skip_serializing_if = "Option::is_none"
1292 )]
1293 pub launch_storyboard_file: Option<String>,
1294 #[serde(
1295 rename = "UILaunchStoryboardIdentifier",
1296 serialize_with = "crate::serialize_option",
1297 skip_serializing_if = "Option::is_none"
1298 )]
1299 pub launch_storyboard_identifier: Option<String>,
1300}
1301
1302/// Application Scene Manifest
1303#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Eq, Default)]
1304pub struct ApplicationSceneManifest {
1305 /// A Boolean value indicating whether the app supports two or more scenes
1306 /// simultaneously.
1307 ///
1308 /// If your app supports multiple scenes, set the value of this key to true.
1309 /// If you set the value to false, UIKit never creates more than one scene for your
1310 /// app.
1311 ///
1312 /// Setting this key to true has implications for your code. An app that supports
1313 /// multiple scenes must coordinate operations to prevent scenes from interfering
1314 /// with each other. For example, if two scenes access the same shared resource,
1315 /// you must synchronize access to that resource using a serial dispatch queue or
1316 /// some other mechanism. Failure to do so may lead to corrupted data or
1317 /// unexpected behavior from your app.
1318 ///
1319 /// ## Availability
1320 /// * iOS 13.0+
1321 ///
1322 /// ## Framework
1323 /// * UIKit
1324 #[serde(
1325 rename = "UIApplicationSupportsMultipleScenes",
1326 serialize_with = "crate::serialize_option",
1327 skip_serializing_if = "Option::is_none"
1328 )]
1329 pub enable_multiple_windows: Option<bool>,
1330 /// The default configuration details for UIKit to use when creating new scenes.
1331 ///
1332 /// ## Availability
1333 /// * iOS 13.0+
1334 ///
1335 /// ## Framework
1336 /// * UIKit
1337 #[serde(
1338 flatten,
1339 rename = "UISceneConfigurations",
1340 serialize_with = "crate::serialize_option",
1341 skip_serializing_if = "Option::is_none"
1342 )]
1343 pub scene_configurations: Option<SceneConfigurations>,
1344}
1345
1346/// Scene Configurations
1347#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Eq, Default)]
1348pub struct SceneConfigurations {
1349 /// Scenes that you use to display content on the device's main screen and respond to
1350 /// user interactions.
1351 ///
1352 /// Use this key to specify the scene configurations for your app.
1353 /// Each scene corresponds to one you use for content you display on the device's main
1354 /// screen. Make your app's default scene the first entry in the array.
1355 ///
1356 /// ## Availability
1357 /// * iOS 13.0+
1358 ///
1359 /// ## Framework
1360 /// * UIKit
1361 #[serde(
1362 flatten,
1363 rename = "UIWindowSceneSessionRoleApplication",
1364 serialize_with = "crate::serialize_option",
1365 skip_serializing_if = "Option::is_none"
1366 )]
1367 pub application_session_role: Option<WindowSceneSessionRole>,
1368 /// Scenes that you use to display content on an externally connected display.
1369 ///
1370 /// Use this key to specify the scene configurations you use when displaying content
1371 /// on an external display. Make the default scene the first entry in the array.
1372 ///
1373 /// ## Availability
1374 /// * iOS 13.0+
1375 ///
1376 /// ## Framework
1377 /// * UIKit
1378 #[serde(
1379 flatten,
1380 rename = "UIWindowSceneSessionRoleExternalDisplay",
1381 serialize_with = "crate::serialize_option",
1382 skip_serializing_if = "Option::is_none"
1383 )]
1384 pub external_display_session_role: Option<WindowSceneSessionRole>,
1385}
1386
1387/// Window Scene Session Role
1388#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Eq, Default)]
1389pub struct WindowSceneSessionRole {
1390 /// The app-specific name you use to identify the scene.
1391 ///
1392 /// ## Availability
1393 /// * iOS 13.0+
1394 ///
1395 /// ## Framework
1396 /// * UIKit
1397 #[serde(
1398 rename = "UISceneConfigurationName",
1399 serialize_with = "crate::serialize_option",
1400 skip_serializing_if = "Option::is_none"
1401 )]
1402 pub configuration_name: Option<String>,
1403 /// The name of the scene class you want UIKit to instantiate.
1404 ///
1405 /// Specify UIWindowScene for scenes meant for your app or an external display. Do not
1406 /// specify UIScene.
1407 ///
1408 /// ## Availability
1409 /// * iOS 13.0+
1410 ///
1411 /// ## Framework
1412 /// * UIKit
1413 #[serde(
1414 rename = "UISceneClassName",
1415 serialize_with = "crate::serialize_option",
1416 skip_serializing_if = "Option::is_none"
1417 )]
1418 pub class_name: Option<String>,
1419 /// The name of the app-specific class that you want UIKit to instantiate and use as
1420 /// the scene delegate object.
1421 ///
1422 /// The class you specify for this key must adopt the UISceneDelegate protocol.
1423 /// If the class you specify for the UISceneClassName key is UIWindowScene,
1424 /// your class must adopt the UIWindowSceneDelegate protocol.
1425 ///
1426 /// ## Availability
1427 /// * iOS 13.0+
1428 ///
1429 /// ## Framework
1430 /// * UIKit
1431 #[serde(
1432 rename = "UISceneDelegateClassName",
1433 serialize_with = "crate::serialize_option",
1434 skip_serializing_if = "Option::is_none"
1435 )]
1436 pub delegate_class_name: Option<String>,
1437 /// The name of the storyboard file containing the scene's initial user interface.
1438 ///
1439 /// Specify the name of the storyboard file without the filename extension. For
1440 /// example, if the filename of your storyboard is Main.storyboard, specify Main
1441 /// as the value for this key.
1442 ///
1443 /// ## Availability
1444 /// * iOS 13.0+
1445 ///
1446 /// ## Framework
1447 /// * UIKit
1448 #[serde(
1449 rename = "UISceneStoryboardFile",
1450 serialize_with = "crate::serialize_option",
1451 skip_serializing_if = "Option::is_none"
1452 )]
1453 pub storyboard_name: Option<String>,
1454}