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/// Default Dictionary
563#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq, Eq)]
564pub struct DefaultDictionary {
565 pub default: String,
566}
567
568/// Network
569#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq, Eq)]
570pub struct Network {
571 /// The URL where Private Click Measurement sends event attribution information.
572 ///
573 /// Include this key in your app to specify where the system sends event attribution
574 /// data it receives from launched websites that support Private Click Measurement
575 /// (PCM). The value provided for this key is a string that contains a valid URL
576 /// that points to a server endpoint. PCM won’t work if your app doesn’t include
577 /// this key.
578 ///
579 /// For more information on PCM and setting up a server to receive event attribution
580 /// data, see Introducing Private Click Measurement.
581 ///
582 /// ### Note
583 /// Mac apps built with Mac Catalyst don’t support PCM.
584 ///
585 /// ## Availability
586 /// * iOS 14.5+
587 ///
588 /// ## Framework
589 /// * UIKit
590 #[serde(
591 rename = "NSAdvertisingAttributionReportEndpoint",
592 serialize_with = "crate::serialize_option",
593 skip_serializing_if = "Option::is_none"
594 )]
595 pub advertising_attribution_report_endpoint: Option<String>,
596 /// A description of changes made to the default security for HTTP connections.
597 ///
598 /// On Apple platforms, a networking feature called App Transport Security (ATS)
599 /// improves privacy and data integrity for all apps and app extensions.
600 /// ATS requires that all HTTP connections made with the URL Loading System—typically
601 /// using the URLSession class—use HTTPS. It further imposes extended security
602 /// checks that supplement the default server trust evaluation prescribed by the
603 /// Transport Layer Security (TLS) protocol. ATS blocks connections that fail to
604 /// meet minimum security specifications. For additional details, see Preventing
605 /// Insecure Network Connections.
606 ///
607 /// You can circumvent or augment these protections by adding the
608 /// NSAppTransportSecurity key to your app’s Information Property List file and
609 /// providing an ATS configuration dictionary as the value. For example, you can:
610 /// * Allow insecure loads for web views while maintaining ATS protections elsewhere
611 /// in your app using the NSAllowsArbitraryLoadsInWebContent key.
612 /// * Enable additional security features like Certificate Transparency using the
613 /// NSRequiresCertificateTransparency key, or Certificate Pinning using the
614 /// NSPinnedDomains key.
615 /// * Reduce or remove security requirements for communication with particular servers
616 /// using the NSExceptionDomains key.
617 ///
618 /// ### Important
619 /// Always look for ways to improve server security before adding ATS exceptions.
620 /// Loosening ATS restrictions reduces the security of your app.
621 ///
622 /// All keys in the ATS configuration dictionary are optional, with default values
623 /// that are suitable for most apps. Keys that define global exceptions apply to
624 /// all network connections made by your app, except connections to domains specified
625 /// in the NSExceptionDomains sub-dictionary. That sub-dictionary allows you to
626 /// separately manage settings for individual domains.
627 ///
628 /// ### Versioning
629 /// ATS operates by default for apps linked against the iOS 9.0 or macOS 10.11 SDKs or
630 /// later. When you link your app against an older SDK, ATS is disabled no matter
631 /// which version of operating system your app runs on.
632 ///
633 /// If you specify a value for any of the global exceptions besides
634 /// NSAllowsArbitraryLoads, then the ATS behavior depends on the version of the OS on
635 /// which your app runs:
636 /// * iOS 9.0 or macOS 10.11
637 /// ATS uses the NSAllowsArbitraryLoads value that you set, or NO by default, and
638 /// ignores the other global exceptions.
639 /// * iOS 10.0 or later or macOS 10.12 or later
640 /// ATS ignores the NSAllowsArbitraryLoads value that you set and instead obeys the
641 /// other key or keys.
642 ///
643 /// This behavior enables you to manage differences between OS versions.
644 /// You provide a coarse exception (NSAllowsArbitraryLoads) for older versions, and a
645 /// more targeted exception, like NSAllowsArbitraryLoadsInWebContent, for when it’s
646 /// available.
647 ///
648 /// ## Availability
649 /// * iOS 9.0+
650 /// * macOS 10.11+
651 ///
652 /// ## Framework
653 /// * Security
654 #[serde(
655 rename = "NSAppTransportSecurity",
656 serialize_with = "crate::serialize_option",
657 skip_serializing_if = "Option::is_none"
658 )]
659 pub app_transport_security: Option<AppTransportSecurity>,
660 /// Bonjour service types browsed by the app.
661 ///
662 /// The value associated with this key is an array of strings that represent Bonjour
663 /// service types. Include all service types that your app expects to use.
664 /// Bonjour service type strings look like _ipp._tcp, and _myservice._udp, where the
665 /// first substring identifies the application protocol and the second identifies the
666 /// transport protocol.
667 ///
668 /// ## Availability
669 /// * iOS 14.0+
670 /// * macOS 11.0+
671 /// * tvOS 14.0+
672 ///
673 /// ## Framework
674 /// * Network
675 #[serde(
676 rename = "NSBonjourServices",
677 serialize_with = "crate::serialize_option",
678 skip_serializing_if = "Option::is_none"
679 )]
680 pub bonjour_services: Option<Vec<String>>,
681 /// A Boolean value that indicates your app supports CloudKit Sharing.
682 ///
683 /// If your app supports CloudKit Sharing, add this key to your app’s Info.plist file
684 /// with a value of true. This tells the system to launch your app when the user
685 /// taps or clicks a share’s URL. For example, one they receive in an email or an
686 /// iMessage from the share’s owner.
687 ///
688 /// Before your app launches, CloudKit verifies that the user has an active iCloud
689 /// account and, for private shares, that it matches their participant details.
690 /// Following successful verification, CloudKit provides the share’s metadata to your
691 /// app’s scene, or application, delegate. The method it calls varies by platform
692 /// and app configuration. For more information, see CKShare.Metadata.
693 ///
694 /// To indicate that your app supports CloudKit Sharing:
695 /// 1. Select your project’s Info.plist file in the Project navigator in Xcode.
696 /// 2. Click the Add button (+) next to any key in the property list editor and press
697 /// Return. 3. Type the key name CKSharingSupported.
698 /// 4. Choose Boolean from the pop-up menu in the Type column.
699 /// 5. Choose YES from the pop-up menu in the Value column.
700 /// 6. Save your changes.
701 ///
702 /// ## Availability
703 /// * iOS 10.0+
704 /// * macOS 10.12+
705 ///
706 /// ## Framework
707 /// * CloudKit
708 #[serde(
709 rename = "CKSharingSupported",
710 serialize_with = "crate::serialize_option",
711 skip_serializing_if = "Option::is_none"
712 )]
713 pub sharing_supported: Option<bool>,
714}
715
716/// App Transport Security
717#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq, Eq)]
718pub struct AppTransportSecurity {
719 /// A Boolean value indicating whether App Transport Security restrictions are
720 /// disabled for all network connections.
721 ///
722 /// Set this key’s value to YES to disable App Transport Security (ATS) restrictions
723 /// for all domains not specified in the NSExceptionDomains dictionary.
724 /// Domains you specify in that dictionary aren’t affected by this key’s value.
725 ///
726 /// ### Important
727 /// You must supply a justification during App Store review if you set the key’s value
728 /// to YES, as described in Provide Justification for Exceptions. Use this key
729 /// with caution because it significantly reduces the security of your app.
730 /// In most cases, it’s better to upgrade your servers to meet the requirements
731 /// imposed by ATS, or at least to use a narrower exception.
732 ///
733 /// Disabling ATS means that unsecured HTTP connections are allowed.
734 /// HTTPS connections are also allowed, and are still subject to default server trust
735 /// evaluation, as described in Ensure the Network Server Meets Minimum Requirements.
736 /// However, extended security checks—like requiring a minimum Transport Layer
737 /// Security (TLS) protocol version—are disabled. Without ATS, you’re also free to
738 /// loosen the default server trust requirements, as described in Performing Manual
739 /// Server Trust Authentication.
740 ///
741 /// In iOS 10 and later and macOS 10.12 and later, the value of the
742 /// NSAllowsArbitraryLoads key is ignored—and the default value of NO used instead—if
743 /// any of the following keys are present in your app’s Information Property List
744 /// file:
745 /// * NSAllowsArbitraryLoadsForMedia
746 /// * NSAllowsArbitraryLoadsInWebContent
747 /// * NSAllowsLocalNetworking
748 ///
749 /// For more information about how the OS version affects ATS behavior, see the
750 /// NSAppTransportSecurity key’s Versioning section.
751 ///
752 /// ## Availability
753 /// * iOS 9.0+
754 /// * macOS 10.11+
755 ///
756 /// ## Framework
757 /// * Security
758 #[serde(
759 rename = "NSAllowsArbitraryLoads",
760 serialize_with = "crate::serialize_option",
761 skip_serializing_if = "Option::is_none"
762 )]
763 pub allows_arbitrary_loads: Option<bool>,
764 /// A Boolean value indicating whether all App Transport Security restrictions are
765 /// disabled for requests made using the AV Foundation framework.
766 ///
767 /// Set this key’s value to YES to disable App Transport Security restrictions for
768 /// media loaded using the AVFoundation framework, without affecting your URLSession
769 /// connections. Domains you specify in the NSExceptionDomains dictionary aren’t
770 /// affected by this key’s value.
771 ///
772 /// Employ this key only for loading encrypted media—like files protected by FairPlay
773 /// or by secure HTTP Live Streaming—that don’t contain personalized information.
774 ///
775 /// In iOS 10 and later and in macOS 10.12 and later, if you include this key with any
776 /// value, then App Transport Security ignores the value of the NSAllowsArbitraryLoads
777 /// key, instead using that key’s default value of NO. For more information about
778 /// how the OS version affects ATS behavior, see the NSAppTransportSecurity key’s
779 /// Versioning section.
780 ///
781 /// ### Important
782 /// You must supply a justification during App Store review if you set the key’s value
783 /// to YES, as described in Provide Justification for Exceptions.
784 ///
785 /// ## Availability
786 /// * iOS 10.0+
787 /// * macOS 10.12+
788 ///
789 /// ## Framework
790 /// * Security
791 #[serde(
792 rename = "NSAllowsArbitraryLoadsForMedia",
793 serialize_with = "crate::serialize_option",
794 skip_serializing_if = "Option::is_none"
795 )]
796 pub allows_arbitrary_loads_for_media: Option<bool>,
797 /// A Boolean value indicating whether all App Transport Security restrictions are
798 /// disabled for requests made from web views.
799 ///
800 /// Set this key’s value to YES to exempt your app’s web views from App Transport
801 /// Security restrictions without affecting your URLSession connections.
802 /// Domains you specify in the NSExceptionDomains dictionary aren’t affected by this
803 /// key’s value.
804 ///
805 /// A web view is an instance of any of the following classes:
806 /// * WKWebView
807 /// * UIWebView (iOS only)
808 /// * WebView (macOS only)
809 ///
810 /// In iOS 10 and later and in macOS 10.12 and later, if you include this key with any
811 /// value, then App Transport Security ignores the value of the NSAllowsArbitraryLoads
812 /// key, instead using that key’s default value of NO. For more information about
813 /// how the OS version affects ATS behavior, see the NSAppTransportSecurity key’s
814 /// Versioning section.
815 ///
816 /// ### Important
817 /// You must supply a justification during App Store review if you set the key’s value
818 /// to YES, as described in Provide Justification for Exceptions.
819 ///
820 /// ## Availability
821 /// * iOS 10.0+
822 /// * macOS 10.12+
823 ///
824 /// ## Framework
825 /// * Security
826 #[serde(
827 rename = "NSAllowsArbitraryLoadsInWebContent",
828 serialize_with = "crate::serialize_option",
829 skip_serializing_if = "Option::is_none"
830 )]
831 pub allows_arbitrary_loads_in_web_content: Option<bool>,
832 /// A Boolean value indicating whether to allow loading of local resources.
833 ///
834 /// In iOS 9 and macOS 10.11, App Transport Security (ATS) disallows connections to
835 /// unqualified domains, .local domains, and IP addresses. You can add exceptions
836 /// for unqualified domains and .local domains in the NSExceptionDomains dictionary,
837 /// but you can’t add numerical IP addresses. Instead you use
838 /// NSAllowsArbitraryLoads when you want to load directly from an IP address.
839 ///
840 /// In iOS 10 and macOS 10.12 and later, ATS allows all three of these connections by
841 /// default, so you no longer need an exception for any of them. However, if you
842 /// need to maintain compatibility with older versions of the OS, set both of the
843 /// NSAllowsArbitraryLoads and NSAllowsLocalNetworking keys to YES.
844 ///
845 /// The local networking exception tells newer versions of the OS—which already allow
846 /// unqualified domains, .local domains, and IP addresses—to ignore the arbitrary
847 /// loads key. Meanwhile, the arbitrary loads key tells older versions of the OS,
848 /// which don’t process the local networking exception key, to bypass ATS completely.
849 /// This allows your app to work on different OS versions while minimizing the use of
850 /// the wider exception. For more information about how global ATS exceptions
851 /// interact across OS versions, see the NSAppTransportSecurity key’s Versioning
852 /// section.
853 ///
854 /// ### Note
855 /// While ATS doesn’t block local loads by default in newer versions of the OS,
856 /// consider setting NSAllowsLocalNetworking to YES as a declaration of intent, if
857 /// appropriate, even if you don’t support older OS versions.
858 ///
859 /// ## Availability
860 /// * iOS 10.0+
861 /// * macOS 10.12+
862 ///
863 /// ## Framework
864 /// * Security
865 #[serde(
866 rename = "NSAllowsLocalNetworking",
867 serialize_with = "crate::serialize_option",
868 skip_serializing_if = "Option::is_none"
869 )]
870 pub allows_local_networking: Option<bool>,
871 /// Custom App Transport Security configurations for named domains.
872 ///
873 /// The value for this key is a dictionary with keys that name specific domains for
874 /// which you want to set exceptions. The value for each domain key is another
875 /// dictionary that indicates the exceptions for that domain.
876 ///
877 /// ```swift
878 /// NSExceptionDomains : Dictionary {
879 /// <domain-name-string> : Dictionary {
880 /// NSIncludesSubdomains : Boolean
881 /// NSExceptionAllowsInsecureHTTPLoads : Boolean
882 /// NSExceptionMinimumTLSVersion : String
883 /// NSExceptionRequiresForwardSecrecy : Boolean
884 /// NSRequiresCertificateTransparency : Boolean
885 /// }
886 /// }
887 /// ```
888 /// Follow these rules when setting a domain name string:
889 /// * Use lowercase. Use example.com, not EXAMPLE.COM.
890 /// * Don’t include a port number. Use example.com, not example.com:443.
891 /// * Don’t use numerical IP addresses. Don’t use 1.2.3.4. For information about how
892 /// ATS handles IP addresses, see NSAllowsLocalNetworking.
893 /// * Don’t include a trailing dot, unless you only want to match a domain string with
894 /// a trailing dot. For example, example.com. (with a trailing dot) matches
895 /// “example.com.” but not “example.com”.
896 /// Similarly, example.com matches “example.com” but not “example.com.”.
897 /// * Don’t use wildcard domains. Don’t use *.example.com. Instead, use example.com
898 /// and set NSIncludesSubdomains to YES.
899 ///
900 /// The values for the keys in each individual domain’s dictionary control how ATS
901 /// treats connections made to that domain.
902 ///
903 /// ### Note
904 /// If you specify an exception domain dictionary, ATS ignores any global
905 /// configuration keys, like NSAllowsArbitraryLoads, for that domain. This is true
906 /// even if you leave the domain-specific dictionary empty and rely entirely on its
907 /// keys’ default values.
908 ///
909 /// ## Availability
910 /// * iOS 9.0+
911 /// * macOS 10.11+
912 ///
913 /// ## Framework
914 /// * Security
915 #[serde(
916 rename = "NSExceptionDomains",
917 serialize_with = "crate::serialize_option",
918 skip_serializing_if = "Option::is_none"
919 )]
920 pub exception_domains: Option<ExceptionDomains>,
921 /// A collection of certificates that App Transport Security expects when connecting
922 /// to named domains.
923 ///
924 /// The value for this optional key is a dictionary with keys that specify the domain
925 /// names for which you want to set the expected certificates. The value for each
926 /// domain name key is another dictionary that configures the expected certificates
927 /// for that domain.
928 ///
929 /// ```swift
930 /// NSPinnedDomains : Dictionary {
931 /// <domain-name-string> : Dictionary {
932 /// NSIncludesSubdomains : Boolean
933 /// NSPinnedCAIdentities : Array
934 /// NSPinnedLeafIdentities : Array
935 /// }
936 /// }
937 /// ```
938 ///
939 /// For any domain that you specify, you must include one or more expected Certificate
940 /// Authority (CA) or sub-CA certificates as the value for the NSPinnedCAIdentities
941 /// key, one or more expected leaf certificates as the value for the
942 /// NSPinnedLeafIdentities key, or both. If you specify both, App Transport
943 /// Security (ATS) requires a match in each category.
944 ///
945 /// To specify a domain name string, follow the rules for domain names given in
946 /// NSExceptionDomains. You can also extend the pinning to cover subdomains by
947 /// setting the value for the NSIncludesSubdomains key to YES.
948 ///
949 /// Pinning a certificate for a given domain has no impact on other security
950 /// requirements or configuration. For example, pinning a CA certificate doesn’t
951 /// change the way the system evaluates that certificate’s suitability as an anchor
952 /// certificate. For information about securing network connections, see
953 /// Preventing Insecure Network Connections.
954 ///
955 /// ## Availability
956 /// * iOS 14.0+
957 /// * macOS 11.0+
958 ///
959 /// ## Framework
960 /// * Security
961 #[serde(
962 rename = "NSPinnedDomains",
963 serialize_with = "crate::serialize_option",
964 skip_serializing_if = "Option::is_none"
965 )]
966 pub pinned_domains: Option<PinnedDomains>,
967}
968
969/// Exception Domains
970#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq, Eq)]
971pub struct ExceptionDomains {
972 /// A Boolean value that indicates whether to extend the configuration to subdomains
973 /// of the given domain.
974 ///
975 /// You can include this key in any of the domain-specific dictionaries that you add
976 /// to the NSExceptionDomains and NSPinnedDomains dictionaries. Adding the
977 /// NSIncludesSubdomains key affects the applicability of the other configuration in
978 /// the same domain-specific dictionary. The key is optional, with a default value
979 /// of NO.
980 ///
981 /// Set the value for this key to YES to apply the configuration for the given domain
982 /// to all subdomains of the domain that have one additional path component.
983 /// For example, if you set this value to YES and the domain name string is
984 /// example.com, then the configuration applies to example.com, as well as
985 /// math.example.com and history.example.com. However, it doesn’t apply to the
986 /// subdomains advanced.math.example.com or ancient.history.example.com because those
987 /// subdomains have two additional path components. If the value is NO the
988 /// configuration applies only to example.com.
989 ///
990 /// ## Availability
991 /// * iOS 9.0+
992 /// * macOS 10.11+
993 ///
994 /// ## Framework
995 /// * Security
996 #[serde(
997 rename = "NSIncludesSubdomains",
998 serialize_with = "crate::serialize_option",
999 skip_serializing_if = "Option::is_none"
1000 )]
1001 pub includes_subdomains: Option<bool>,
1002 /// A Boolean value indicating whether to allow insecure HTTP loads.
1003 ///
1004 /// Set the value for this key to YES to allow insecure HTTP loads for the given
1005 /// domain, or to be able to loosen the server trust evaluation requirements for HTTPS
1006 /// connections to the domain, as described in Performing Manual Server Trust
1007 /// Authentication.
1008 ///
1009 /// Using this key doesn’t by itself change default server trust evaluation
1010 /// requirements for HTTPS connections, described in Ensure the Network Server Meets
1011 /// Minimum Requirements. Using only this key also doesn’t change the TLS or
1012 /// forward secrecy requirements imposed by ATS. As a result, you might need to
1013 /// combine this key with the NSExceptionMinimumTLSVersion or
1014 /// NSExceptionRequiresForwardSecrecy key in certain cases.
1015 ///
1016 /// This key is optional.
1017 /// The default value is NO.
1018 ///
1019 /// ### Important
1020 /// You must supply a justification during App Store review if you set the key’s value
1021 /// to YES, as described in Provide Justification for Exceptions.
1022 ///
1023 /// ## Availability
1024 /// * iOS 9.0+
1025 /// * macOS 10.11+
1026 ///
1027 /// ## Framework
1028 /// * Security
1029 #[serde(
1030 rename = "NSExceptionAllowsInsecureHTTPLoads",
1031 serialize_with = "crate::serialize_option",
1032 skip_serializing_if = "Option::is_none"
1033 )]
1034 pub exception_allows_insecure_http_loads: Option<bool>,
1035 /// The minimum Transport Layer Security (TLS) version for network connections.
1036 ///
1037 /// This key is optional. The value is a string, with a default value of TLSv1.2.
1038 ///
1039 /// ### Important
1040 /// You must supply a justification during App Store review if you use this key to set
1041 /// a protocol version lower than 1.2, as described in Provide Justification for
1042 /// Exceptions.
1043 ///
1044 /// ## Availability
1045 /// * iOS 9.0+
1046 /// * macOS 10.11+
1047 ///
1048 /// ## Framework
1049 /// * Security
1050 #[serde(
1051 rename = "NSExceptionMinimumTLSVersion",
1052 skip_serializing_if = "Option::is_none",
1053 serialize_with = "crate::serialize_enum_option"
1054 )]
1055 pub exception_minimum_tls_version: Option<ExceptionMinimumTlsVersion>,
1056 /// A Boolean value indicating whether to override the perfect forward secrecy
1057 /// requirement.
1058 ///
1059 /// Set the value for this key to NO to override the requirement that a server support
1060 /// perfect forward secrecy (PFS) for the given domain. Disabling this requirement
1061 /// also removes the key length check described in Ensure the Network Server Meets
1062 /// Minimum Requirements. However, it doesn’t impact the TLS version requirement.
1063 /// To control that, use NSExceptionMinimumTLSVersion.
1064 ///
1065 /// This key is optional.
1066 /// The default value is YES, which limits the accepted ciphers to those that support
1067 /// PFS through Elliptic Curve Diffie-Hellman Ephemeral (ECDHE) key exchange.
1068 ///
1069 /// ## Availability
1070 /// * iOS 9.0+
1071 /// * macOS 10.11+
1072 ///
1073 /// ## Framework
1074 /// * Security
1075 #[serde(
1076 rename = "NSExceptionRequiresForwardSecrecy",
1077 serialize_with = "crate::serialize_option",
1078 skip_serializing_if = "Option::is_none"
1079 )]
1080 pub exception_requires_forward_secrecy: Option<bool>,
1081 /// A Boolean value indicating whether to require Certificate Transparency.
1082 ///
1083 /// Certificate Transparency (CT) is a protocol that ATS can use to identify
1084 /// mistakenly or maliciously issued X.509 certificates. Set the value for the
1085 /// NSRequiresCertificateTransparency key to YES to require that for a given domain,
1086 /// server certificates are supported by valid, signed CT timestamps from at least two
1087 /// CT logs trusted by Apple. For more information about Certificate Transparency,
1088 /// see RFC6962.
1089 ///
1090 /// Unlike most other ATS exceptions, using a non-default value in this case tightens
1091 /// security requirements.
1092 ///
1093 /// This key is optional.
1094 /// The default value is NO.
1095 ///
1096 /// ## Availability
1097 /// * iOS 9.0+
1098 /// * macOS 10.11+
1099 ///
1100 /// ## Framework
1101 /// * Security
1102 #[serde(
1103 rename = "NSRequiresCertificateTransparency",
1104 serialize_with = "crate::serialize_option",
1105 skip_serializing_if = "Option::is_none"
1106 )]
1107 pub requires_certificate_transparency: Option<bool>,
1108}
1109
1110/// Exception Minimum TLS Version
1111#[derive(Deserialize, Serialize, Clone, Debug, PartialEq, Eq)]
1112pub enum ExceptionMinimumTlsVersion {
1113 /// Require a minimum TLS version of 1.0.
1114 #[serde(rename = "TLSv1.0")]
1115 TlSv10,
1116 /// Require a minimum TLS version of 1.1.
1117 #[serde(rename = "TLSv1.1")]
1118 TlSv11,
1119 /// Require a minimum TLS version of 1.2.
1120 #[serde(rename = "TLSv1.2")]
1121 TlSv12,
1122 /// Require a minimum TLS version of 1.3.
1123 #[serde(rename = "TLSv1.3")]
1124 TlSv13,
1125}
1126
1127/// Pinned Domains
1128#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq, Eq)]
1129pub struct PinnedDomains {
1130 /// A Boolean value that indicates whether to extend the configuration to subdomains
1131 /// of the given domain.
1132 ///
1133 /// You can include this key in any of the domain-specific dictionaries that you add
1134 /// to the NSExceptionDomains and NSPinnedDomains dictionaries. Adding the
1135 /// NSIncludesSubdomains key affects the applicability of the other configuration in
1136 /// the same domain-specific dictionary. The key is optional, with a default value
1137 /// of NO.
1138 ///
1139 /// Set the value for this key to YES to apply the configuration for the given domain
1140 /// to all subdomains of the domain that have one additional path component.
1141 /// For example, if you set this value to YES and the domain name string is
1142 /// example.com, then the configuration applies to example.com, as well as
1143 /// math.example.com and history.example.com. However, it doesn’t apply to the
1144 /// subdomains advanced.math.example.com or ancient.history.example.com because those
1145 /// subdomains have two additional path components.
1146 ///
1147 /// If the value is NO the configuration applies only to example.com.
1148 ///
1149 /// ## Availability
1150 /// * iOS 9.0+
1151 /// * macOS 10.11+
1152 ///
1153 /// ## Framework
1154 /// * Security
1155 #[serde(
1156 rename = "NSIncludesSubdomains",
1157 serialize_with = "crate::serialize_option",
1158 skip_serializing_if = "Option::is_none"
1159 )]
1160 pub includes_subdomains: Option<bool>,
1161 /// A list of allowed Certificate Authority certificates for a given domain name.
1162 ///
1163 /// Provide an array of dictionaries as the value for this key.
1164 /// Each dictionary in the array contains the SPKI-SHA256-BASE64 key with a value that
1165 /// represents the Base64-encoded SHA-256 digest of an X.509 certificate’s DER-encoded
1166 /// ASN.1 Subject Public Key Info (SPKI) structure.
1167 ///
1168 /// ```swift
1169 /// NSPinnedCAIdentities : Array {
1170 /// Dictionary {
1171 /// SPKI-SHA256-BASE64 : String
1172 /// }
1173 /// }
1174 /// ```
1175 ///
1176 /// When making a network connection to a named domain, App Transport Security (ATS)
1177 /// blocks the connection unless it can find the SPKI digest of at least one
1178 /// Certificate Authority (CA) or sub-CA certificate in the chain presented by the
1179 /// server.
1180 ///
1181 /// You must include this key or the NSPinnedLeafIdentities key or both in each
1182 /// domain-specific NSPinnedDomains subdictionary. If you include both, then both
1183 /// must produce a match.
1184 ///
1185 /// ## Availability
1186 /// * iOS 14.0+
1187 /// * macOS 11.0+
1188 ///
1189 /// ## Framework
1190 /// * Security
1191 #[serde(
1192 rename = "NSPinnedCAIdentities",
1193 serialize_with = "crate::serialize_option",
1194 skip_serializing_if = "Option::is_none"
1195 )]
1196 pub pinned_ca_identities: Option<Vec<Spkisha256Base64>>,
1197}
1198
1199/// SPKI-SHA256-BASE64
1200#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq, Eq)]
1201pub struct Spkisha256Base64 {
1202 /// The digest of an X.509 certificate’s Subject Public Key Info structure.
1203 ///
1204 /// You represent a pinned certificate using the Base64-encoded SHA-256 digest of an
1205 /// X.509 certificate’s DER-encoded ASN.1 Subject Public Key Info (SPKI) structure.
1206 /// For a PEM-encoded public-key certificate stored in the file ca.pem, you can
1207 /// calculate the SPKI-SHA256-BASE64 value with the following openssl commands:
1208 ///
1209 /// ```swift
1210 /// % cat ca.pem |
1211 /// openssl x509 -inform pem -noout -outform pem -pubkey |
1212 /// openssl pkey -pubin -inform pem -outform der |
1213 /// openssl dgst -sha256 -binary |
1214 /// openssl enc -base64
1215 /// ```
1216 ///
1217 /// ## Availability
1218 /// * iOS 14.0+
1219 /// * macOS 11.0+
1220 ///
1221 /// ## Framework
1222 /// * Security
1223 #[serde(
1224 rename = "SPKI-SHA256-BASE64",
1225 serialize_with = "crate::serialize_option",
1226 skip_serializing_if = "Option::is_none"
1227 )]
1228 pub spki_sha256_base64: Option<String>,
1229}
1230
1231/// Storage
1232#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq, Eq)]
1233pub struct Storage {
1234 /// Describes the files or directories the app installs on the system.
1235 ///
1236 /// ## Availability
1237 /// * macOS 10.0+
1238 ///
1239 /// ## Framework
1240 /// * AppKit
1241 #[serde(
1242 rename = "APFiles",
1243 serialize_with = "crate::serialize_option",
1244 skip_serializing_if = "Option::is_none"
1245 )]
1246 pub files: Option<Files>,
1247 /// The base path to the files or directories the app installs.
1248 ///
1249 /// ## Availability
1250 /// * macOS 10.0+
1251 ///
1252 /// ## Framework
1253 /// * AppKit
1254 #[serde(
1255 rename = "APInstallerURL",
1256 serialize_with = "crate::serialize_option",
1257 skip_serializing_if = "Option::is_none"
1258 )]
1259 pub installer_url: Option<String>,
1260 /// A Boolean value indicating whether the app continues working if the system purges
1261 /// the local storage.
1262 ///
1263 /// ## Availability
1264 /// * iOS 9.3+
1265 ///
1266 /// ## Framework
1267 /// * Foundation
1268 #[serde(
1269 rename = "NSSupportsPurgeableLocalStorage",
1270 serialize_with = "crate::serialize_option",
1271 skip_serializing_if = "Option::is_none"
1272 )]
1273 pub supports_purgeable_local_storage: Option<bool>,
1274 /// A Boolean value indicating whether the files this app creates are quarantined by
1275 /// default.
1276 ///
1277 /// ## Availability
1278 /// * macOS 10.0+
1279 ///
1280 /// ## Framework
1281 /// * Core Services
1282 #[serde(
1283 rename = "LSFileQuarantineEnabled",
1284 serialize_with = "crate::serialize_option",
1285 skip_serializing_if = "Option::is_none"
1286 )]
1287 pub file_quarantine_enabled: Option<bool>,
1288 /// A Boolean value indicating whether the app shares files through iTunes.
1289 ///
1290 /// ## Availability
1291 /// * iOS 3.2+
1292 /// * tvOS 9.0+
1293 /// * watchOS 2.0+
1294 ///
1295 /// ## Framework
1296 /// * UIKit
1297 #[serde(
1298 rename = "UIFileSharingEnabled",
1299 serialize_with = "crate::serialize_option",
1300 skip_serializing_if = "Option::is_none"
1301 )]
1302 pub file_sharing_enabled: Option<bool>,
1303 /// A Boolean value indicating whether the app's resources files should be mapped into
1304 /// memory.
1305 ///
1306 /// ## Availability
1307 /// * macOS 10.0+
1308 ///
1309 /// ## Framework
1310 /// * Core Foundation
1311 #[serde(
1312 rename = "CSResourcesFileMapped",
1313 serialize_with = "crate::serialize_option",
1314 skip_serializing_if = "Option::is_none"
1315 )]
1316 pub resources_file_mapped: Option<bool>,
1317 /// A Boolean value that indicates whether the system should download documents before
1318 /// handing them over to the app.
1319 ///
1320 /// By default, the system displays the download progress.
1321 /// Set the value to YES if you want your app to display a custom download progress
1322 /// indicator instead.
1323 ///
1324 /// ## Availability
1325 /// * macOS 11.0+
1326 ///
1327 /// ## Framework
1328 /// * AppKit
1329 #[serde(
1330 rename = "NSDownloadsUbiquitousContents",
1331 serialize_with = "crate::serialize_option",
1332 skip_serializing_if = "Option::is_none"
1333 )]
1334 pub downloads_ubiquitous_contents: Option<bool>,
1335}
1336
1337/// Files
1338#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq, Eq)]
1339pub struct Files {
1340 /// A Boolean value indicating whether the file or a folder icon is displayed in the
1341 /// Info window.
1342 ///
1343 /// ## Availability
1344 /// * macOS 10.0+
1345 ///
1346 /// ## Framework
1347 /// * AppKit
1348 #[serde(
1349 rename = "APDisplayedAsContainer",
1350 serialize_with = "crate::serialize_option",
1351 skip_serializing_if = "Option::is_none"
1352 )]
1353 pub displayed_as_container: Option<bool>,
1354 /// A short description of the file or folder that appears in the Info window.
1355 ///
1356 /// ## Availability
1357 /// * macOS 10.0+
1358 ///
1359 /// ## Framework
1360 /// * AppKit
1361 #[serde(rename = "APFileDescriptionKey")]
1362 pub file_description_key: String,
1363 /// The path to use when installing the file or folder, relative to the app bundle.
1364 ///
1365 /// ## Availability
1366 /// * macOS 10.0+
1367 ///
1368 /// ## Framework
1369 /// * AppKit
1370 #[serde(rename = "APFileDestinationPath")]
1371 pub file_destination_path: String,
1372 /// The name of the file or folder to install.
1373 ///
1374 /// ## Availability
1375 /// * macOS 10.0+
1376 ///
1377 /// ## Framework
1378 /// * AppKit
1379 #[serde(rename = "APFileName")]
1380 pub file_name: String,
1381 /// The path to the file or folder in the app package, relative to the installer path.
1382 ///
1383 /// ## Availability
1384 /// * macOS 10.0+
1385 ///
1386 /// ## Framework
1387 /// * AppKit
1388 #[serde(rename = "APFileSourcePath")]
1389 pub file_source_path: String,
1390 /// The action to take on the file or folder.
1391 ///
1392 /// ## Availability
1393 /// * macOS 10.0+
1394 ///
1395 /// ## Framework
1396 /// * AppKit
1397 #[serde(
1398 rename = "APInstallAction",
1399 skip_serializing_if = "Option::is_none",
1400 serialize_with = "crate::serialize_enum_option"
1401 )]
1402 pub install_action: Option<InstallAction>,
1403}
1404
1405/// Install Action
1406#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq)]
1407pub enum InstallAction {
1408 #[serde(rename = "Copy")]
1409 Copy,
1410 #[serde(rename = "Open")]
1411 Open,
1412}
1413
1414/// Core ML Models
1415#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq, Eq)]
1416pub struct CoreMlModels {
1417 /// A Boolean value indicating whether the app contains a Core ML model to optimize
1418 /// loading the model.
1419 ///
1420 /// ## Availability
1421 /// * iOS 12.0+
1422 /// * macOS 10.0+
1423 /// * tvOS 12.0+
1424 /// * watchOS 5.0+
1425 ///
1426 /// ## Framework
1427 /// * Core Services
1428 #[serde(
1429 rename = "LSBundleContainsCoreMLmlmodelc",
1430 serialize_with = "crate::serialize_option",
1431 skip_serializing_if = "Option::is_none"
1432 )]
1433 pub bundle_contains_core_ml_mlmodelc: Option<bool>,
1434}
1435
1436/// Java
1437#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq, Eq)]
1438pub struct Java {
1439 /// The root directory for the app’s Java class files.
1440 ///
1441 /// ## Availability
1442 /// * macOS 10.0+
1443 ///
1444 /// ## Framework
1445 /// * Foundation
1446 #[serde(
1447 rename = "NSJavaRoot",
1448 serialize_with = "crate::serialize_option",
1449 skip_serializing_if = "Option::is_none"
1450 )]
1451 pub java_root: Option<String>,
1452}