apple_bundle/info_plist/data_and_storage.rs
1//! # Data and Storage
2//!
3//! Regulate documents, URLs, and other kinds of data movement and storage.
4//!
5//! ### Overview
6//! The system needs to know what kinds of data your app stores, provides, or consumes.
7//! Add keys to your app’s Information Property List that declare your app’s data
8//! management capabilities.
9
10use serde::{Deserialize, Serialize};
11
12/// Documents
13#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq, Eq)]
14pub struct Documents {
15 /// The document types supported by the bundle.
16 ///
17 /// ## Availability
18 /// * iOS 2.0+
19 /// * macOS 10.0+
20 /// * tvOS 9.0+
21 /// * watchOS 2.0+
22 ///
23 /// ## Framework
24 /// * Core Foundation
25 #[serde(
26 rename = "CFBundleDocumentTypes",
27 serialize_with = "crate::serialize_option",
28 skip_serializing_if = "Option::is_none"
29 )]
30 pub bundle_document_types: Option<Vec<BundleDocumentTypes>>,
31 /// A Boolean value indicating whether the app is a document-based app.
32 ///
33 /// ## Availability
34 /// * iOS 12.0+
35 ///
36 /// ## Framework
37 /// * Core Services
38 #[serde(
39 rename = "UISupportsDocumentBrowser",
40 serialize_with = "crate::serialize_option",
41 skip_serializing_if = "Option::is_none"
42 )]
43 pub supports_document_browser: Option<bool>,
44 /// A Boolean value indicating whether the app may open the original document from a
45 /// file provider, rather than a copy of the document.
46 ///
47 /// ## Availability
48 /// * iOS 12.0+
49 ///
50 /// ## Framework
51 /// * Core Services
52 #[serde(
53 rename = "LSSupportsOpeningDocumentsInPlace",
54 serialize_with = "crate::serialize_option",
55 skip_serializing_if = "Option::is_none"
56 )]
57 pub supports_opening_documents_in_place: Option<bool>,
58 /// The Core Data persistent store type associated with a document type.
59 ///
60 /// ## Availability
61 /// * macOS 10.4+
62 ///
63 /// ## Framework
64 /// * Core Data
65 #[serde(
66 rename = "NSPersistentStoreTypeKey",
67 skip_serializing_if = "Option::is_none",
68 serialize_with = "crate::serialize_enum_option"
69 )]
70 pub persistent_store_type_key: Option<PersistentStoreTypeKey>,
71 /// A Boolean value that indicates whether the system should download documents before
72 /// handing them over to the app.
73 ///
74 /// By default, the system displays the download progress. Set the value to YES if you
75 /// want your app to display a custom download progress indicator instead.
76 ///
77 /// ## Availability
78 /// * macOS 11.0+
79 ///
80 /// ## Framework
81 /// * AppKit
82 #[serde(
83 rename = "NSDownloadsUbiquitousContents",
84 serialize_with = "crate::serialize_option",
85 skip_serializing_if = "Option::is_none"
86 )]
87 pub downloads_ubiquitous_contents: Option<bool>,
88}
89
90/// Persistent Store Type Key
91#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq)]
92pub enum PersistentStoreTypeKey {
93 #[serde(rename = "SQLite")]
94 SqLite,
95 #[serde(rename = "XML")]
96 Xml,
97 #[serde(rename = "Binary")]
98 Binary,
99 #[serde(rename = "InMemory")]
100 InMemory,
101}
102
103/// URL Schemes
104#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq, Eq)]
105pub struct UrlSchemes {
106 /// A list of URL schemes (http, ftp, and so on) supported by the app.
107 ///
108 /// ## Availability
109 /// * iOS 2.0+
110 /// * macOS 10.0+
111 /// * tvOS 9.0+
112 /// * watchOS 2.0+
113 ///
114 /// ## Framework
115 /// * Core Foundation
116 #[serde(
117 rename = "CFBundleURLTypes",
118 serialize_with = "crate::serialize_option",
119 skip_serializing_if = "Option::is_none"
120 )]
121 pub bundle_url_types: Option<Vec<BundleUrlTypes>>,
122}
123
124/// Bundle Document Types
125#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq, Eq)]
126pub struct BundleDocumentTypes {
127 /// The icon to associate with the document type.
128 ///
129 /// ## Availability
130 /// * iOS 2.0+
131 /// * macOS 10.0+
132 /// * tvOS 9.0+
133 /// * watchOS 2.0+
134 ///
135 /// ## Framework
136 /// * Core Foundation
137 #[serde(
138 rename = "CFBundleTypeIconFile",
139 serialize_with = "crate::serialize_option",
140 skip_serializing_if = "Option::is_none"
141 )]
142 pub bundle_type_icon_file: Option<String>,
143 /// The abstract name for the document type.
144 ///
145 /// ## Availability
146 /// * iOS 2.0+
147 /// * macOS 10.0+
148 /// * tvOS 9.0+
149 /// * watchOS 2.0+
150 ///
151 /// ## Framework
152 /// * Core Foundation
153 #[serde(rename = "CFBundleTypeName")]
154 pub bundle_type_name: String,
155 /// The app's role with respect to the document type.
156 ///
157 /// ## Availability
158 /// * iOS 2.0+
159 /// * macOS 10.0+
160 /// * tvOS 9.0+
161 /// * watchOS 2.0+
162 ///
163 /// ## Framework
164 /// * Core Foundation
165 #[serde(
166 rename = "CFBundleTypeRole",
167 skip_serializing_if = "Option::is_none",
168 serialize_with = "crate::serialize_enum_option"
169 )]
170 pub bundle_type_role: Option<BundleTypeRole>,
171 /// The ranking of this app among apps that declare themselves as editors or viewers
172 /// of the given file type.
173 ///
174 /// ## Availability
175 /// * iOS 2.0+
176 /// * macOS 10.0+
177 /// * tvOS 9.0+
178 /// * watchOS 2.0+
179 ///
180 /// ## Framework
181 /// * Core Foundation
182 #[serde(
183 rename = "LSHandlerRank",
184 skip_serializing_if = "Option::is_none",
185 serialize_with = "crate::serialize_enum_option"
186 )]
187 pub handler_rank: Option<HandlerRank>,
188 /// The document file types the app supports.
189 ///
190 /// ## Availability
191 /// * iOS 2.0+
192 /// * macOS 10.0+
193 /// * tvOS 9.0+
194 /// * watchOS 2.0+
195 ///
196 /// ## Framework
197 /// * Core Foundation
198 #[serde(
199 rename = "LSItemContentTypes",
200 serialize_with = "crate::serialize_option",
201 skip_serializing_if = "Option::is_none"
202 )]
203 pub item_content_types: Option<Vec<String>>,
204 /// A Boolean value indicating whether the document is distributed as a bundle.
205 ///
206 /// ## Availability
207 /// * iOS 2.0+
208 /// * macOS 10.0+
209 /// * tvOS 9.0+
210 /// * watchOS 2.0+
211 ///
212 /// ## Framework
213 /// * Core Foundation
214 #[serde(
215 rename = "LSTypeIsPackage",
216 serialize_with = "crate::serialize_option",
217 skip_serializing_if = "Option::is_none"
218 )]
219 pub type_is_package: Option<bool>,
220 /// The subclass used to create instances of this document.
221 ///
222 /// ## Availability
223 /// * iOS 2.0+
224 /// * macOS 10.0+
225 /// * tvOS 9.0+
226 /// * watchOS 2.0+
227 ///
228 /// ## Framework
229 /// * Core Foundation
230 #[serde(
231 rename = "NSDocumentClass",
232 serialize_with = "crate::serialize_option",
233 skip_serializing_if = "Option::is_none"
234 )]
235 pub document_class: Option<String>,
236 /// The file types that this document can be exported to.
237 ///
238 /// ## Availability
239 /// * iOS 2.0+
240 /// * macOS 10.0+
241 /// * tvOS 9.0+
242 /// * watchOS 2.0+
243 ///
244 /// ## Framework
245 /// * Core Foundation
246 #[serde(
247 rename = "NSExportableTypes",
248 serialize_with = "crate::serialize_option",
249 skip_serializing_if = "Option::is_none"
250 )]
251 pub exportable_types: Option<Vec<String>>,
252}
253
254/// Bundle Type Role
255#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq)]
256pub enum BundleTypeRole {
257 #[serde(rename = "Editor")]
258 Editor,
259 #[serde(rename = "Viewer")]
260 Viewer,
261 #[serde(rename = "Shell")]
262 Shell,
263 #[serde(rename = "QLGenerator")]
264 QlGenerator,
265 #[serde(rename = "None")]
266 None,
267}
268
269/// Handler Rank
270#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq)]
271pub enum HandlerRank {
272 #[serde(rename = "Owner")]
273 Owner,
274 #[serde(rename = "Default")]
275 Default,
276 #[serde(rename = "Alternate")]
277 Alternate,
278 #[serde(rename = "None")]
279 None,
280}
281
282/// Bundle URL Types
283#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq, Eq)]
284pub struct BundleUrlTypes {
285 /// The app’s role with respect to the type.
286 ///
287 /// ## Availability
288 /// * iOS 2.0+
289 /// * macOS 10.0+
290 /// * tvOS 9.0+
291 /// * watchOS 2.0+
292 ///
293 /// ## Framework
294 /// * Core Foundation
295 #[serde(
296 rename = "CFBundleTypeRole",
297 serialize_with = "crate::serialize_option",
298 skip_serializing_if = "Option::is_none"
299 )]
300 pub bundle_type_role: Option<BundleTypeRole>,
301 /// The name of the icon image file, without the extension, to be used for this type.
302 ///
303 /// ## Availability
304 /// * iOS 2.0+
305 /// * macOS 10.0+
306 /// * tvOS 9.0+
307 /// * watchOS 2.0+
308 ///
309 /// ## Framework
310 /// * Core Foundation
311 #[serde(
312 rename = "CFBundleURLIconFile",
313 serialize_with = "crate::serialize_option",
314 skip_serializing_if = "Option::is_none"
315 )]
316 pub bundle_url_icon_file: Option<String>,
317 /// The abstract name for this type.
318 ///
319 /// ## Availability
320 /// * iOS 2.0+
321 /// * macOS 10.0+
322 /// * tvOS 9.0+
323 /// * watchOS 2.0+
324 ///
325 /// ## Framework
326 /// * Core Foundation
327 #[serde(rename = "CFBundleURLName")]
328 pub bundle_url_name: String,
329 /// The URL schemes supported by this type.
330 ///
331 /// ## Availability
332 /// * iOS 2.0+
333 /// * macOS 10.0+
334 /// * tvOS 9.0+
335 /// * watchOS 2.0+
336 ///
337 /// ## Framework
338 /// * Core Foundation
339 #[serde(
340 rename = "CFBundleURLSchemes",
341 serialize_with = "crate::serialize_option",
342 skip_serializing_if = "Option::is_none"
343 )]
344 pub bundle_url_schemes: Option<Vec<String>>,
345}
346
347/// Universal Type Identifiers
348#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq, Eq)]
349pub struct UniversalTypeIdentifiers {
350 /// The uniform type identifiers owned and exported by the app.
351 ///
352 /// ## Availability
353 /// * iOS 5.0+
354 /// * macOS 10.7+
355 ///
356 /// ## Framework
357 /// * Core Services
358 #[serde(
359 rename = "UTExportedTypeDeclarations",
360 serialize_with = "crate::serialize_option",
361 skip_serializing_if = "Option::is_none"
362 )]
363 pub exported_type_declarations: Option<Vec<ExportedTypeDeclarations>>,
364 /// The uniform type identifiers inherently supported, but not owned, by the app.
365 ///
366 /// ## Availability
367 /// * iOS 3.2+
368 /// * macOS 10.5+
369 ///
370 /// ## Framework
371 /// * Core Services
372 #[serde(
373 rename = "UTImportedTypeDeclarations",
374 serialize_with = "crate::serialize_option",
375 skip_serializing_if = "Option::is_none"
376 )]
377 pub imported_type_declarations: Option<Vec<ImportedTypeDeclarations>>,
378}
379
380/// Exported Type Declarations
381#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq, Eq)]
382pub struct ExportedTypeDeclarations {
383 /// The Uniform Type Identifier types that this type conforms to.
384 ///
385 /// ## Availability
386 /// * iOS 5.0+
387 /// * macOS 10.7+
388 ///
389 /// ## Framework
390 /// * Core Services
391 #[serde(rename = "UTTypeConformsTo")]
392 pub type_conforms_to: Vec<String>,
393 /// A description for this type.
394 ///
395 /// ## Availability
396 /// * iOS 5.0+
397 /// * macOS 10.7+
398 ///
399 /// ## Framework
400 /// * Core Services
401 #[serde(
402 rename = "UTTypeDescription",
403 serialize_with = "crate::serialize_option",
404 skip_serializing_if = "Option::is_none"
405 )]
406 pub type_description: Option<String>,
407 /// The bundle icon resource to associate with this type.
408 ///
409 /// ## Availability
410 /// * iOS 5.0+
411 /// * macOS 10.7+
412 ///
413 /// ## Framework
414 /// * Core Services
415 #[serde(
416 rename = "UTTypeIconFile",
417 serialize_with = "crate::serialize_option",
418 skip_serializing_if = "Option::is_none"
419 )]
420 pub type_icon_file: Option<String>,
421 /// One or more bundle icon resources to associate with this type.
422 ///
423 /// ## Availability
424 /// * iOS 5.0+
425 /// * macOS 10.7+
426 ///
427 /// ## Framework
428 /// * Core Services
429 #[serde(
430 rename = "UTTypeIconFiles",
431 serialize_with = "crate::serialize_option",
432 skip_serializing_if = "Option::is_none"
433 )]
434 pub type_icon_files: Option<Vec<String>>,
435 /// The Uniform Type Identifier to assign to this type.
436 ///
437 /// ## Availability
438 /// * iOS 5.0+
439 /// * macOS 10.7+
440 ///
441 /// ## Framework
442 /// * Core Services
443 #[serde(rename = "UTTypeIdentifier")]
444 pub type_identifier: String,
445 /// The webpage for a reference document that describes this type.
446 ///
447 /// ## Availability
448 /// * iOS 5.0+
449 /// * macOS 10.7+
450 ///
451 /// ## Framework
452 /// * Core Services
453 #[serde(
454 rename = "UTTypeReferenceURL",
455 serialize_with = "crate::serialize_option",
456 skip_serializing_if = "Option::is_none"
457 )]
458 pub type_reference_url: Option<String>,
459 /// A dictionary defining one or more equivalent type identifiers.
460 ///
461 /// ## Availability
462 /// * iOS 5.0+
463 /// * macOS 10.7+
464 ///
465 /// ## Framework
466 /// * Core Services
467 #[serde(rename = "UTTypeTagSpecification")]
468 pub type_tag_specification: DefaultDictionary,
469}
470
471/// Imported Type Declarations
472#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq, Eq)]
473pub struct ImportedTypeDeclarations {
474 /// The Uniform Type Identifier types that this type conforms to.
475 ///
476 /// ## Availability
477 /// * iOS 3.2+
478 /// * macOS 10.5+
479 ///
480 /// ## Framework
481 /// * Core Services
482 #[serde(rename = "UTTypeConformsTo")]
483 pub type_conforms_to: Vec<String>,
484 /// A description for this type.
485 ///
486 /// ## Availability
487 /// * iOS 3.2+
488 /// * macOS 10.5+
489 ///
490 /// ## Framework
491 /// * Core Services
492 #[serde(
493 rename = "UTTypeDescription",
494 serialize_with = "crate::serialize_option",
495 skip_serializing_if = "Option::is_none"
496 )]
497 pub type_description: Option<String>,
498 /// The bundle icon resource to associate with this type.
499 ///
500 /// ## Availability
501 /// * iOS 3.2+
502 /// * macOS 10.5+
503 ///
504 /// ## Framework
505 /// * Core Services
506 #[serde(
507 rename = "UTTypeIconFile",
508 serialize_with = "crate::serialize_option",
509 skip_serializing_if = "Option::is_none"
510 )]
511 pub type_icon_file: Option<String>,
512 /// One or more bundle icon resources to associate with this type.
513 ///
514 /// ## Availability
515 /// * iOS 3.2+
516 /// * macOS 10.5+
517 ///
518 /// ## Framework
519 /// * Core Services
520 #[serde(
521 rename = "UTTypeIconFiles",
522 serialize_with = "crate::serialize_option",
523 skip_serializing_if = "Option::is_none"
524 )]
525 pub type_icon_files: Option<Vec<String>>,
526 /// The Uniform Type Identifier to assign to this type.
527 ///
528 /// ## Availability
529 /// * iOS 3.2+
530 /// * macOS 10.5+
531 ///
532 /// ## Framework
533 /// * Core Services
534 #[serde(rename = "UTTypeIdentifier")]
535 pub type_identifier: String,
536 /// The webpage for a reference document that describes this type.
537 ///
538 /// ## Availability
539 /// * iOS 3.2+
540 /// * macOS 10.5+
541 ///
542 /// ## Framework
543 /// * Core Services
544 #[serde(
545 rename = "UTTypeReferenceURL",
546 serialize_with = "crate::serialize_option",
547 skip_serializing_if = "Option::is_none"
548 )]
549 pub type_reference_url: Option<String>,
550 /// A dictionary defining one or more equivalent type identifiers.
551 ///
552 /// ## Availability
553 /// * iOS 3.2+
554 /// * macOS 10.5+
555 ///
556 /// ## Framework
557 /// * Core Services
558 #[serde(rename = "UTTypeTagSpecification")]
559 pub type_tag_specification: DefaultDictionary,
560}
561
562/// A dictionary containing a default value.
563pub use super::app_execution::DefaultDictionary;
564
565/// Network
566#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq, Eq)]
567pub struct Network {
568 /// The URL where Private Click Measurement sends event attribution information.
569 ///
570 /// Include this key in your app to specify where the system sends event attribution
571 /// data it receives from launched websites that support Private Click Measurement
572 /// (PCM). The value provided for this key is a string that contains a valid URL
573 /// that points to a server endpoint. PCM won’t work if your app doesn’t include
574 /// this key.
575 ///
576 /// For more information on PCM and setting up a server to receive event attribution
577 /// data, see Introducing Private Click Measurement.
578 ///
579 /// ### Note
580 /// Mac apps built with Mac Catalyst don’t support PCM.
581 ///
582 /// ## Availability
583 /// * iOS 14.5+
584 ///
585 /// ## Framework
586 /// * UIKit
587 #[serde(
588 rename = "NSAdvertisingAttributionReportEndpoint",
589 serialize_with = "crate::serialize_option",
590 skip_serializing_if = "Option::is_none"
591 )]
592 pub advertising_attribution_report_endpoint: Option<String>,
593 /// A description of changes made to the default security for HTTP connections.
594 ///
595 /// On Apple platforms, a networking feature called App Transport Security (ATS)
596 /// improves privacy and data integrity for all apps and app extensions.
597 /// ATS requires that all HTTP connections made with the URL Loading System—typically
598 /// using the URLSession class—use HTTPS. It further imposes extended security
599 /// checks that supplement the default server trust evaluation prescribed by the
600 /// Transport Layer Security (TLS) protocol. ATS blocks connections that fail to
601 /// meet minimum security specifications. For additional details, see Preventing
602 /// Insecure Network Connections.
603 ///
604 /// You can circumvent or augment these protections by adding the
605 /// NSAppTransportSecurity key to your app’s Information Property List file and
606 /// providing an ATS configuration dictionary as the value. For example, you can:
607 /// * Allow insecure loads for web views while maintaining ATS protections elsewhere
608 /// in your app using the NSAllowsArbitraryLoadsInWebContent key.
609 /// * Enable additional security features like Certificate Transparency using the
610 /// NSRequiresCertificateTransparency key, or Certificate Pinning using the
611 /// NSPinnedDomains key.
612 /// * Reduce or remove security requirements for communication with particular servers
613 /// using the NSExceptionDomains key.
614 ///
615 /// ### Important
616 /// Always look for ways to improve server security before adding ATS exceptions.
617 /// Loosening ATS restrictions reduces the security of your app.
618 ///
619 /// All keys in the ATS configuration dictionary are optional, with default values
620 /// that are suitable for most apps. Keys that define global exceptions apply to
621 /// all network connections made by your app, except connections to domains specified
622 /// in the NSExceptionDomains sub-dictionary. That sub-dictionary allows you to
623 /// separately manage settings for individual domains.
624 ///
625 /// ### Versioning
626 /// ATS operates by default for apps linked against the iOS 9.0 or macOS 10.11 SDKs or
627 /// later. When you link your app against an older SDK, ATS is disabled no matter
628 /// which version of operating system your app runs on.
629 ///
630 /// If you specify a value for any of the global exceptions besides
631 /// NSAllowsArbitraryLoads, then the ATS behavior depends on the version of the OS on
632 /// which your app runs:
633 /// * iOS 9.0 or macOS 10.11
634 /// ATS uses the NSAllowsArbitraryLoads value that you set, or NO by default, and
635 /// ignores the other global exceptions.
636 /// * iOS 10.0 or later or macOS 10.12 or later
637 /// ATS ignores the NSAllowsArbitraryLoads value that you set and instead obeys the
638 /// other key or keys.
639 ///
640 /// This behavior enables you to manage differences between OS versions.
641 /// You provide a coarse exception (NSAllowsArbitraryLoads) for older versions, and a
642 /// more targeted exception, like NSAllowsArbitraryLoadsInWebContent, for when it’s
643 /// available.
644 ///
645 /// ## Availability
646 /// * iOS 9.0+
647 /// * macOS 10.11+
648 ///
649 /// ## Framework
650 /// * Security
651 #[serde(
652 rename = "NSAppTransportSecurity",
653 serialize_with = "crate::serialize_option",
654 skip_serializing_if = "Option::is_none"
655 )]
656 pub app_transport_security: Option<AppTransportSecurity>,
657 /// Bonjour service types browsed by the app.
658 ///
659 /// The value associated with this key is an array of strings that represent Bonjour
660 /// service types. Include all service types that your app expects to use.
661 /// Bonjour service type strings look like _ipp._tcp, and _myservice._udp, where the
662 /// first substring identifies the application protocol and the second identifies the
663 /// transport protocol.
664 ///
665 /// ## Availability
666 /// * iOS 14.0+
667 /// * macOS 11.0+
668 /// * tvOS 14.0+
669 ///
670 /// ## Framework
671 /// * Network
672 #[serde(
673 rename = "NSBonjourServices",
674 serialize_with = "crate::serialize_option",
675 skip_serializing_if = "Option::is_none"
676 )]
677 pub bonjour_services: Option<Vec<String>>,
678 /// A Boolean value that indicates your app supports CloudKit Sharing.
679 ///
680 /// If your app supports CloudKit Sharing, add this key to your app’s Info.plist file
681 /// with a value of true. This tells the system to launch your app when the user
682 /// taps or clicks a share’s URL. For example, one they receive in an email or an
683 /// iMessage from the share’s owner.
684 ///
685 /// Before your app launches, CloudKit verifies that the user has an active iCloud
686 /// account and, for private shares, that it matches their participant details.
687 /// Following successful verification, CloudKit provides the share’s metadata to your
688 /// app’s scene, or application, delegate. The method it calls varies by platform
689 /// and app configuration. For more information, see CKShare.Metadata.
690 ///
691 /// To indicate that your app supports CloudKit Sharing:
692 /// 1. Select your project’s Info.plist file in the Project navigator in Xcode.
693 /// 2. Click the Add button (+) next to any key in the property list editor and press
694 /// Return. 3. Type the key name CKSharingSupported.
695 /// 4. Choose Boolean from the pop-up menu in the Type column.
696 /// 5. Choose YES from the pop-up menu in the Value column.
697 /// 6. Save your changes.
698 ///
699 /// ## Availability
700 /// * iOS 10.0+
701 /// * macOS 10.12+
702 ///
703 /// ## Framework
704 /// * CloudKit
705 #[serde(
706 rename = "CKSharingSupported",
707 serialize_with = "crate::serialize_option",
708 skip_serializing_if = "Option::is_none"
709 )]
710 pub sharing_supported: Option<bool>,
711}
712
713/// App Transport Security
714#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq, Eq)]
715pub struct AppTransportSecurity {
716 /// A Boolean value indicating whether App Transport Security restrictions are
717 /// disabled for all network connections.
718 ///
719 /// Set this key’s value to YES to disable App Transport Security (ATS) restrictions
720 /// for all domains not specified in the NSExceptionDomains dictionary.
721 /// Domains you specify in that dictionary aren’t affected by this key’s value.
722 ///
723 /// ### Important
724 /// You must supply a justification during App Store review if you set the key’s value
725 /// to YES, as described in Provide Justification for Exceptions. Use this key
726 /// with caution because it significantly reduces the security of your app.
727 /// In most cases, it’s better to upgrade your servers to meet the requirements
728 /// imposed by ATS, or at least to use a narrower exception.
729 ///
730 /// Disabling ATS means that unsecured HTTP connections are allowed.
731 /// HTTPS connections are also allowed, and are still subject to default server trust
732 /// evaluation, as described in Ensure the Network Server Meets Minimum Requirements.
733 /// However, extended security checks—like requiring a minimum Transport Layer
734 /// Security (TLS) protocol version—are disabled. Without ATS, you’re also free to
735 /// loosen the default server trust requirements, as described in Performing Manual
736 /// Server Trust Authentication.
737 ///
738 /// In iOS 10 and later and macOS 10.12 and later, the value of the
739 /// NSAllowsArbitraryLoads key is ignored—and the default value of NO used instead—if
740 /// any of the following keys are present in your app’s Information Property List
741 /// file:
742 /// * NSAllowsArbitraryLoadsForMedia
743 /// * NSAllowsArbitraryLoadsInWebContent
744 /// * NSAllowsLocalNetworking
745 ///
746 /// For more information about how the OS version affects ATS behavior, see the
747 /// NSAppTransportSecurity key’s Versioning section.
748 ///
749 /// ## Availability
750 /// * iOS 9.0+
751 /// * macOS 10.11+
752 ///
753 /// ## Framework
754 /// * Security
755 #[serde(
756 rename = "NSAllowsArbitraryLoads",
757 serialize_with = "crate::serialize_option",
758 skip_serializing_if = "Option::is_none"
759 )]
760 pub allows_arbitrary_loads: Option<bool>,
761 /// A Boolean value indicating whether all App Transport Security restrictions are
762 /// disabled for requests made using the AV Foundation framework.
763 ///
764 /// Set this key’s value to YES to disable App Transport Security restrictions for
765 /// media loaded using the AVFoundation framework, without affecting your URLSession
766 /// connections. Domains you specify in the NSExceptionDomains dictionary aren’t
767 /// affected by this key’s value.
768 ///
769 /// Employ this key only for loading encrypted media—like files protected by FairPlay
770 /// or by secure HTTP Live Streaming—that don’t contain personalized information.
771 ///
772 /// In iOS 10 and later and in macOS 10.12 and later, if you include this key with any
773 /// value, then App Transport Security ignores the value of the NSAllowsArbitraryLoads
774 /// key, instead using that key’s default value of NO. For more information about
775 /// how the OS version affects ATS behavior, see the NSAppTransportSecurity key’s
776 /// Versioning section.
777 ///
778 /// ### Important
779 /// You must supply a justification during App Store review if you set the key’s value
780 /// to YES, as described in Provide Justification for Exceptions.
781 ///
782 /// ## Availability
783 /// * iOS 10.0+
784 /// * macOS 10.12+
785 ///
786 /// ## Framework
787 /// * Security
788 #[serde(
789 rename = "NSAllowsArbitraryLoadsForMedia",
790 serialize_with = "crate::serialize_option",
791 skip_serializing_if = "Option::is_none"
792 )]
793 pub allows_arbitrary_loads_for_media: Option<bool>,
794 /// A Boolean value indicating whether all App Transport Security restrictions are
795 /// disabled for requests made from web views.
796 ///
797 /// Set this key’s value to YES to exempt your app’s web views from App Transport
798 /// Security restrictions without affecting your URLSession connections.
799 /// Domains you specify in the NSExceptionDomains dictionary aren’t affected by this
800 /// key’s value.
801 ///
802 /// A web view is an instance of any of the following classes:
803 /// * WKWebView
804 /// * UIWebView (iOS only)
805 /// * WebView (macOS only)
806 ///
807 /// In iOS 10 and later and in macOS 10.12 and later, if you include this key with any
808 /// value, then App Transport Security ignores the value of the NSAllowsArbitraryLoads
809 /// key, instead using that key’s default value of NO. For more information about
810 /// how the OS version affects ATS behavior, see the NSAppTransportSecurity key’s
811 /// Versioning section.
812 ///
813 /// ### Important
814 /// You must supply a justification during App Store review if you set the key’s value
815 /// to YES, as described in Provide Justification for Exceptions.
816 ///
817 /// ## Availability
818 /// * iOS 10.0+
819 /// * macOS 10.12+
820 ///
821 /// ## Framework
822 /// * Security
823 #[serde(
824 rename = "NSAllowsArbitraryLoadsInWebContent",
825 serialize_with = "crate::serialize_option",
826 skip_serializing_if = "Option::is_none"
827 )]
828 pub allows_arbitrary_loads_in_web_content: Option<bool>,
829 /// A Boolean value indicating whether to allow loading of local resources.
830 ///
831 /// In iOS 9 and macOS 10.11, App Transport Security (ATS) disallows connections to
832 /// unqualified domains, .local domains, and IP addresses. You can add exceptions
833 /// for unqualified domains and .local domains in the NSExceptionDomains dictionary,
834 /// but you can’t add numerical IP addresses. Instead you use
835 /// NSAllowsArbitraryLoads when you want to load directly from an IP address.
836 ///
837 /// In iOS 10 and macOS 10.12 and later, ATS allows all three of these connections by
838 /// default, so you no longer need an exception for any of them. However, if you
839 /// need to maintain compatibility with older versions of the OS, set both of the
840 /// NSAllowsArbitraryLoads and NSAllowsLocalNetworking keys to YES.
841 ///
842 /// The local networking exception tells newer versions of the OS—which already allow
843 /// unqualified domains, .local domains, and IP addresses—to ignore the arbitrary
844 /// loads key. Meanwhile, the arbitrary loads key tells older versions of the OS,
845 /// which don’t process the local networking exception key, to bypass ATS completely.
846 /// This allows your app to work on different OS versions while minimizing the use of
847 /// the wider exception. For more information about how global ATS exceptions
848 /// interact across OS versions, see the NSAppTransportSecurity key’s Versioning
849 /// section.
850 ///
851 /// ### Note
852 /// While ATS doesn’t block local loads by default in newer versions of the OS,
853 /// consider setting NSAllowsLocalNetworking to YES as a declaration of intent, if
854 /// appropriate, even if you don’t support older OS versions.
855 ///
856 /// ## Availability
857 /// * iOS 10.0+
858 /// * macOS 10.12+
859 ///
860 /// ## Framework
861 /// * Security
862 #[serde(
863 rename = "NSAllowsLocalNetworking",
864 serialize_with = "crate::serialize_option",
865 skip_serializing_if = "Option::is_none"
866 )]
867 pub allows_local_networking: Option<bool>,
868 /// Custom App Transport Security configurations for named domains.
869 ///
870 /// The value for this key is a dictionary with keys that name specific domains for
871 /// which you want to set exceptions. The value for each domain key is another
872 /// dictionary that indicates the exceptions for that domain.
873 ///
874 /// ```swift
875 /// NSExceptionDomains : Dictionary {
876 /// <domain-name-string> : Dictionary {
877 /// NSIncludesSubdomains : Boolean
878 /// NSExceptionAllowsInsecureHTTPLoads : Boolean
879 /// NSExceptionMinimumTLSVersion : String
880 /// NSExceptionRequiresForwardSecrecy : Boolean
881 /// NSRequiresCertificateTransparency : Boolean
882 /// }
883 /// }
884 /// ```
885 /// Follow these rules when setting a domain name string:
886 /// * Use lowercase. Use example.com, not EXAMPLE.COM.
887 /// * Don’t include a port number. Use example.com, not example.com:443.
888 /// * Don’t use numerical IP addresses. Don’t use 1.2.3.4. For information about how
889 /// ATS handles IP addresses, see NSAllowsLocalNetworking.
890 /// * Don’t include a trailing dot, unless you only want to match a domain string with
891 /// a trailing dot. For example, example.com. (with a trailing dot) matches
892 /// “example.com.” but not “example.com”.
893 /// Similarly, example.com matches “example.com” but not “example.com.”.
894 /// * Don’t use wildcard domains. Don’t use *.example.com. Instead, use example.com
895 /// and set NSIncludesSubdomains to YES.
896 ///
897 /// The values for the keys in each individual domain’s dictionary control how ATS
898 /// treats connections made to that domain.
899 ///
900 /// ### Note
901 /// If you specify an exception domain dictionary, ATS ignores any global
902 /// configuration keys, like NSAllowsArbitraryLoads, for that domain. This is true
903 /// even if you leave the domain-specific dictionary empty and rely entirely on its
904 /// keys’ default values.
905 ///
906 /// ## Availability
907 /// * iOS 9.0+
908 /// * macOS 10.11+
909 ///
910 /// ## Framework
911 /// * Security
912 #[serde(
913 rename = "NSExceptionDomains",
914 serialize_with = "crate::serialize_option",
915 skip_serializing_if = "Option::is_none"
916 )]
917 pub exception_domains: Option<ExceptionDomains>,
918 /// A collection of certificates that App Transport Security expects when connecting
919 /// to named domains.
920 ///
921 /// The value for this optional key is a dictionary with keys that specify the domain
922 /// names for which you want to set the expected certificates. The value for each
923 /// domain name key is another dictionary that configures the expected certificates
924 /// for that domain.
925 ///
926 /// ```swift
927 /// NSPinnedDomains : Dictionary {
928 /// <domain-name-string> : Dictionary {
929 /// NSIncludesSubdomains : Boolean
930 /// NSPinnedCAIdentities : Array
931 /// NSPinnedLeafIdentities : Array
932 /// }
933 /// }
934 /// ```
935 ///
936 /// For any domain that you specify, you must include one or more expected Certificate
937 /// Authority (CA) or sub-CA certificates as the value for the NSPinnedCAIdentities
938 /// key, one or more expected leaf certificates as the value for the
939 /// NSPinnedLeafIdentities key, or both. If you specify both, App Transport
940 /// Security (ATS) requires a match in each category.
941 ///
942 /// To specify a domain name string, follow the rules for domain names given in
943 /// NSExceptionDomains. You can also extend the pinning to cover subdomains by
944 /// setting the value for the NSIncludesSubdomains key to YES.
945 ///
946 /// Pinning a certificate for a given domain has no impact on other security
947 /// requirements or configuration. For example, pinning a CA certificate doesn’t
948 /// change the way the system evaluates that certificate’s suitability as an anchor
949 /// certificate. For information about securing network connections, see
950 /// Preventing Insecure Network Connections.
951 ///
952 /// ## Availability
953 /// * iOS 14.0+
954 /// * macOS 11.0+
955 ///
956 /// ## Framework
957 /// * Security
958 #[serde(
959 rename = "NSPinnedDomains",
960 serialize_with = "crate::serialize_option",
961 skip_serializing_if = "Option::is_none"
962 )]
963 pub pinned_domains: Option<PinnedDomains>,
964}
965
966/// Exception Domains
967#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq, Eq)]
968pub struct ExceptionDomains {
969 /// A Boolean value that indicates whether to extend the configuration to subdomains
970 /// of the given domain.
971 ///
972 /// You can include this key in any of the domain-specific dictionaries that you add
973 /// to the NSExceptionDomains and NSPinnedDomains dictionaries. Adding the
974 /// NSIncludesSubdomains key affects the applicability of the other configuration in
975 /// the same domain-specific dictionary. The key is optional, with a default value
976 /// of NO.
977 ///
978 /// Set the value for this key to YES to apply the configuration for the given domain
979 /// to all subdomains of the domain that have one additional path component.
980 /// For example, if you set this value to YES and the domain name string is
981 /// example.com, then the configuration applies to example.com, as well as
982 /// math.example.com and history.example.com. However, it doesn’t apply to the
983 /// subdomains advanced.math.example.com or ancient.history.example.com because those
984 /// subdomains have two additional path components. If the value is NO the
985 /// configuration applies only to example.com.
986 ///
987 /// ## Availability
988 /// * iOS 9.0+
989 /// * macOS 10.11+
990 ///
991 /// ## Framework
992 /// * Security
993 #[serde(
994 rename = "NSIncludesSubdomains",
995 serialize_with = "crate::serialize_option",
996 skip_serializing_if = "Option::is_none"
997 )]
998 pub includes_subdomains: Option<bool>,
999 /// A Boolean value indicating whether to allow insecure HTTP loads.
1000 ///
1001 /// Set the value for this key to YES to allow insecure HTTP loads for the given
1002 /// domain, or to be able to loosen the server trust evaluation requirements for HTTPS
1003 /// connections to the domain, as described in Performing Manual Server Trust
1004 /// Authentication.
1005 ///
1006 /// Using this key doesn’t by itself change default server trust evaluation
1007 /// requirements for HTTPS connections, described in Ensure the Network Server Meets
1008 /// Minimum Requirements. Using only this key also doesn’t change the TLS or
1009 /// forward secrecy requirements imposed by ATS. As a result, you might need to
1010 /// combine this key with the NSExceptionMinimumTLSVersion or
1011 /// NSExceptionRequiresForwardSecrecy key in certain cases.
1012 ///
1013 /// This key is optional.
1014 /// The default value is NO.
1015 ///
1016 /// ### Important
1017 /// You must supply a justification during App Store review if you set the key’s value
1018 /// to YES, as described in Provide Justification for Exceptions.
1019 ///
1020 /// ## Availability
1021 /// * iOS 9.0+
1022 /// * macOS 10.11+
1023 ///
1024 /// ## Framework
1025 /// * Security
1026 #[serde(
1027 rename = "NSExceptionAllowsInsecureHTTPLoads",
1028 serialize_with = "crate::serialize_option",
1029 skip_serializing_if = "Option::is_none"
1030 )]
1031 pub exception_allows_insecure_http_loads: Option<bool>,
1032 /// The minimum Transport Layer Security (TLS) version for network connections.
1033 ///
1034 /// This key is optional. The value is a string, with a default value of TLSv1.2.
1035 ///
1036 /// ### Important
1037 /// You must supply a justification during App Store review if you use this key to set
1038 /// a protocol version lower than 1.2, as described in Provide Justification for
1039 /// Exceptions.
1040 ///
1041 /// ## Availability
1042 /// * iOS 9.0+
1043 /// * macOS 10.11+
1044 ///
1045 /// ## Framework
1046 /// * Security
1047 #[serde(
1048 rename = "NSExceptionMinimumTLSVersion",
1049 skip_serializing_if = "Option::is_none",
1050 serialize_with = "crate::serialize_enum_option"
1051 )]
1052 pub exception_minimum_tls_version: Option<ExceptionMinimumTlsVersion>,
1053 /// A Boolean value indicating whether to override the perfect forward secrecy
1054 /// requirement.
1055 ///
1056 /// Set the value for this key to NO to override the requirement that a server support
1057 /// perfect forward secrecy (PFS) for the given domain. Disabling this requirement
1058 /// also removes the key length check described in Ensure the Network Server Meets
1059 /// Minimum Requirements. However, it doesn’t impact the TLS version requirement.
1060 /// To control that, use NSExceptionMinimumTLSVersion.
1061 ///
1062 /// This key is optional.
1063 /// The default value is YES, which limits the accepted ciphers to those that support
1064 /// PFS through Elliptic Curve Diffie-Hellman Ephemeral (ECDHE) key exchange.
1065 ///
1066 /// ## Availability
1067 /// * iOS 9.0+
1068 /// * macOS 10.11+
1069 ///
1070 /// ## Framework
1071 /// * Security
1072 #[serde(
1073 rename = "NSExceptionRequiresForwardSecrecy",
1074 serialize_with = "crate::serialize_option",
1075 skip_serializing_if = "Option::is_none"
1076 )]
1077 pub exception_requires_forward_secrecy: Option<bool>,
1078 /// A Boolean value indicating whether to require Certificate Transparency.
1079 ///
1080 /// Certificate Transparency (CT) is a protocol that ATS can use to identify
1081 /// mistakenly or maliciously issued X.509 certificates. Set the value for the
1082 /// NSRequiresCertificateTransparency key to YES to require that for a given domain,
1083 /// server certificates are supported by valid, signed CT timestamps from at least two
1084 /// CT logs trusted by Apple. For more information about Certificate Transparency,
1085 /// see RFC6962.
1086 ///
1087 /// Unlike most other ATS exceptions, using a non-default value in this case tightens
1088 /// security requirements.
1089 ///
1090 /// This key is optional.
1091 /// The default value is NO.
1092 ///
1093 /// ## Availability
1094 /// * iOS 9.0+
1095 /// * macOS 10.11+
1096 ///
1097 /// ## Framework
1098 /// * Security
1099 #[serde(
1100 rename = "NSRequiresCertificateTransparency",
1101 serialize_with = "crate::serialize_option",
1102 skip_serializing_if = "Option::is_none"
1103 )]
1104 pub requires_certificate_transparency: Option<bool>,
1105}
1106
1107/// Exception Minimum TLS Version
1108#[derive(Deserialize, Serialize, Clone, Debug, PartialEq, Eq)]
1109pub enum ExceptionMinimumTlsVersion {
1110 /// Require a minimum TLS version of 1.0.
1111 #[serde(rename = "TLSv1.0")]
1112 TlSv10,
1113 /// Require a minimum TLS version of 1.1.
1114 #[serde(rename = "TLSv1.1")]
1115 TlSv11,
1116 /// Require a minimum TLS version of 1.2.
1117 #[serde(rename = "TLSv1.2")]
1118 TlSv12,
1119 /// Require a minimum TLS version of 1.3.
1120 #[serde(rename = "TLSv1.3")]
1121 TlSv13,
1122}
1123
1124/// Pinned Domains
1125#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq, Eq)]
1126pub struct PinnedDomains {
1127 /// A Boolean value that indicates whether to extend the configuration to subdomains
1128 /// of the given domain.
1129 ///
1130 /// You can include this key in any of the domain-specific dictionaries that you add
1131 /// to the NSExceptionDomains and NSPinnedDomains dictionaries. Adding the
1132 /// NSIncludesSubdomains key affects the applicability of the other configuration in
1133 /// the same domain-specific dictionary. The key is optional, with a default value
1134 /// of NO.
1135 ///
1136 /// Set the value for this key to YES to apply the configuration for the given domain
1137 /// to all subdomains of the domain that have one additional path component.
1138 /// For example, if you set this value to YES and the domain name string is
1139 /// example.com, then the configuration applies to example.com, as well as
1140 /// math.example.com and history.example.com. However, it doesn’t apply to the
1141 /// subdomains advanced.math.example.com or ancient.history.example.com because those
1142 /// subdomains have two additional path components.
1143 ///
1144 /// If the value is NO the configuration applies only to example.com.
1145 ///
1146 /// ## Availability
1147 /// * iOS 9.0+
1148 /// * macOS 10.11+
1149 ///
1150 /// ## Framework
1151 /// * Security
1152 #[serde(
1153 rename = "NSIncludesSubdomains",
1154 serialize_with = "crate::serialize_option",
1155 skip_serializing_if = "Option::is_none"
1156 )]
1157 pub includes_subdomains: Option<bool>,
1158 /// A list of allowed Certificate Authority certificates for a given domain name.
1159 ///
1160 /// Provide an array of dictionaries as the value for this key.
1161 /// Each dictionary in the array contains the SPKI-SHA256-BASE64 key with a value that
1162 /// represents the Base64-encoded SHA-256 digest of an X.509 certificate’s DER-encoded
1163 /// ASN.1 Subject Public Key Info (SPKI) structure.
1164 ///
1165 /// ```swift
1166 /// NSPinnedCAIdentities : Array {
1167 /// Dictionary {
1168 /// SPKI-SHA256-BASE64 : String
1169 /// }
1170 /// }
1171 /// ```
1172 ///
1173 /// When making a network connection to a named domain, App Transport Security (ATS)
1174 /// blocks the connection unless it can find the SPKI digest of at least one
1175 /// Certificate Authority (CA) or sub-CA certificate in the chain presented by the
1176 /// server.
1177 ///
1178 /// You must include this key or the NSPinnedLeafIdentities key or both in each
1179 /// domain-specific NSPinnedDomains subdictionary. If you include both, then both
1180 /// must produce a match.
1181 ///
1182 /// ## Availability
1183 /// * iOS 14.0+
1184 /// * macOS 11.0+
1185 ///
1186 /// ## Framework
1187 /// * Security
1188 #[serde(
1189 rename = "NSPinnedCAIdentities",
1190 serialize_with = "crate::serialize_option",
1191 skip_serializing_if = "Option::is_none"
1192 )]
1193 pub pinned_ca_identities: Option<Vec<Spkisha256Base64>>,
1194}
1195
1196/// SPKI-SHA256-BASE64
1197#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq, Eq)]
1198pub struct Spkisha256Base64 {
1199 /// The digest of an X.509 certificate’s Subject Public Key Info structure.
1200 ///
1201 /// You represent a pinned certificate using the Base64-encoded SHA-256 digest of an
1202 /// X.509 certificate’s DER-encoded ASN.1 Subject Public Key Info (SPKI) structure.
1203 /// For a PEM-encoded public-key certificate stored in the file ca.pem, you can
1204 /// calculate the SPKI-SHA256-BASE64 value with the following openssl commands:
1205 ///
1206 /// ```swift
1207 /// % cat ca.pem |
1208 /// openssl x509 -inform pem -noout -outform pem -pubkey |
1209 /// openssl pkey -pubin -inform pem -outform der |
1210 /// openssl dgst -sha256 -binary |
1211 /// openssl enc -base64
1212 /// ```
1213 ///
1214 /// ## Availability
1215 /// * iOS 14.0+
1216 /// * macOS 11.0+
1217 ///
1218 /// ## Framework
1219 /// * Security
1220 #[serde(
1221 rename = "SPKI-SHA256-BASE64",
1222 serialize_with = "crate::serialize_option",
1223 skip_serializing_if = "Option::is_none"
1224 )]
1225 pub spki_sha256_base64: Option<String>,
1226}
1227
1228/// Storage
1229#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq, Eq)]
1230pub struct Storage {
1231 /// Describes the files or directories the app installs on the system.
1232 ///
1233 /// ## Availability
1234 /// * macOS 10.0+
1235 ///
1236 /// ## Framework
1237 /// * AppKit
1238 #[serde(
1239 rename = "APFiles",
1240 serialize_with = "crate::serialize_option",
1241 skip_serializing_if = "Option::is_none"
1242 )]
1243 pub files: Option<Files>,
1244 /// The base path to the files or directories the app installs.
1245 ///
1246 /// ## Availability
1247 /// * macOS 10.0+
1248 ///
1249 /// ## Framework
1250 /// * AppKit
1251 #[serde(
1252 rename = "APInstallerURL",
1253 serialize_with = "crate::serialize_option",
1254 skip_serializing_if = "Option::is_none"
1255 )]
1256 pub installer_url: Option<String>,
1257 /// A Boolean value indicating whether the app continues working if the system purges
1258 /// the local storage.
1259 ///
1260 /// ## Availability
1261 /// * iOS 9.3+
1262 ///
1263 /// ## Framework
1264 /// * Foundation
1265 #[serde(
1266 rename = "NSSupportsPurgeableLocalStorage",
1267 serialize_with = "crate::serialize_option",
1268 skip_serializing_if = "Option::is_none"
1269 )]
1270 pub supports_purgeable_local_storage: Option<bool>,
1271 /// A Boolean value indicating whether the files this app creates are quarantined by
1272 /// default.
1273 ///
1274 /// ## Availability
1275 /// * macOS 10.0+
1276 ///
1277 /// ## Framework
1278 /// * Core Services
1279 #[serde(
1280 rename = "LSFileQuarantineEnabled",
1281 serialize_with = "crate::serialize_option",
1282 skip_serializing_if = "Option::is_none"
1283 )]
1284 pub file_quarantine_enabled: Option<bool>,
1285 /// A Boolean value indicating whether the app shares files through iTunes.
1286 ///
1287 /// ## Availability
1288 /// * iOS 3.2+
1289 /// * tvOS 9.0+
1290 /// * watchOS 2.0+
1291 ///
1292 /// ## Framework
1293 /// * UIKit
1294 #[serde(
1295 rename = "UIFileSharingEnabled",
1296 serialize_with = "crate::serialize_option",
1297 skip_serializing_if = "Option::is_none"
1298 )]
1299 pub file_sharing_enabled: Option<bool>,
1300 /// A Boolean value indicating whether the app's resources files should be mapped into
1301 /// memory.
1302 ///
1303 /// ## Availability
1304 /// * macOS 10.0+
1305 ///
1306 /// ## Framework
1307 /// * Core Foundation
1308 #[serde(
1309 rename = "CSResourcesFileMapped",
1310 serialize_with = "crate::serialize_option",
1311 skip_serializing_if = "Option::is_none"
1312 )]
1313 pub resources_file_mapped: Option<bool>,
1314 /// A Boolean value that indicates whether the system should download documents before
1315 /// handing them over to the app.
1316 ///
1317 /// By default, the system displays the download progress.
1318 /// Set the value to YES if you want your app to display a custom download progress
1319 /// indicator instead.
1320 ///
1321 /// ## Availability
1322 /// * macOS 11.0+
1323 ///
1324 /// ## Framework
1325 /// * AppKit
1326 #[serde(
1327 rename = "NSDownloadsUbiquitousContents",
1328 serialize_with = "crate::serialize_option",
1329 skip_serializing_if = "Option::is_none"
1330 )]
1331 pub downloads_ubiquitous_contents: Option<bool>,
1332}
1333
1334/// Files
1335#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq, Eq)]
1336pub struct Files {
1337 /// A Boolean value indicating whether the file or a folder icon is displayed in the
1338 /// Info window.
1339 ///
1340 /// ## Availability
1341 /// * macOS 10.0+
1342 ///
1343 /// ## Framework
1344 /// * AppKit
1345 #[serde(
1346 rename = "APDisplayedAsContainer",
1347 serialize_with = "crate::serialize_option",
1348 skip_serializing_if = "Option::is_none"
1349 )]
1350 pub displayed_as_container: Option<bool>,
1351 /// A short description of the file or folder that appears in the Info window.
1352 ///
1353 /// ## Availability
1354 /// * macOS 10.0+
1355 ///
1356 /// ## Framework
1357 /// * AppKit
1358 #[serde(rename = "APFileDescriptionKey")]
1359 pub file_description_key: String,
1360 /// The path to use when installing the file or folder, relative to the app bundle.
1361 ///
1362 /// ## Availability
1363 /// * macOS 10.0+
1364 ///
1365 /// ## Framework
1366 /// * AppKit
1367 #[serde(rename = "APFileDestinationPath")]
1368 pub file_destination_path: String,
1369 /// The name of the file or folder to install.
1370 ///
1371 /// ## Availability
1372 /// * macOS 10.0+
1373 ///
1374 /// ## Framework
1375 /// * AppKit
1376 #[serde(rename = "APFileName")]
1377 pub file_name: String,
1378 /// The path to the file or folder in the app package, relative to the installer path.
1379 ///
1380 /// ## Availability
1381 /// * macOS 10.0+
1382 ///
1383 /// ## Framework
1384 /// * AppKit
1385 #[serde(rename = "APFileSourcePath")]
1386 pub file_source_path: String,
1387 /// The action to take on the file or folder.
1388 ///
1389 /// ## Availability
1390 /// * macOS 10.0+
1391 ///
1392 /// ## Framework
1393 /// * AppKit
1394 #[serde(
1395 rename = "APInstallAction",
1396 skip_serializing_if = "Option::is_none",
1397 serialize_with = "crate::serialize_enum_option"
1398 )]
1399 pub install_action: Option<InstallAction>,
1400}
1401
1402/// Install Action
1403#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq)]
1404pub enum InstallAction {
1405 #[serde(rename = "Copy")]
1406 Copy,
1407 #[serde(rename = "Open")]
1408 Open,
1409}
1410
1411/// Core ML Models
1412#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq, Eq)]
1413pub struct CoreMlModels {
1414 /// A Boolean value indicating whether the app contains a Core ML model to optimize
1415 /// loading the model.
1416 ///
1417 /// ## Availability
1418 /// * iOS 12.0+
1419 /// * macOS 10.0+
1420 /// * tvOS 12.0+
1421 /// * watchOS 5.0+
1422 ///
1423 /// ## Framework
1424 /// * Core Services
1425 #[serde(
1426 rename = "LSBundleContainsCoreMLmlmodelc",
1427 serialize_with = "crate::serialize_option",
1428 skip_serializing_if = "Option::is_none"
1429 )]
1430 pub bundle_contains_core_ml_mlmodelc: Option<bool>,
1431}
1432
1433/// Java
1434#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq, Eq)]
1435pub struct Java {
1436 /// The root directory for the app’s Java class files.
1437 ///
1438 /// ## Availability
1439 /// * macOS 10.0+
1440 ///
1441 /// ## Framework
1442 /// * Foundation
1443 #[serde(
1444 rename = "NSJavaRoot",
1445 serialize_with = "crate::serialize_option",
1446 skip_serializing_if = "Option::is_none"
1447 )]
1448 pub java_root: Option<String>,
1449}