apple_bundle/entitlements/
education.rs

1use serde::{Deserialize, Serialize};
2
3/// Education
4#[derive(Serialize, Deserialize, Clone, Default, Debug, PartialEq, Eq)]
5pub struct Education {
6    /// The ClassKit development or production environment for an education app that works
7    /// with the Schoolwork app.
8    ///
9    /// This key specifies the ClassKit environment your app uses to share data with
10    /// Apple’s Schoolwork app.
11    ///
12    /// To support testing locally, Xcode sets the value to development by default. When
13    /// you upload your app to the App Store, Xcode changes the value to production.
14    ///
15    /// To add this entitlement to your app, enable the ClassKit capability in Xcode.
16    ///
17    /// ## Availability
18    /// * iOS 11.4+
19    /// * macOS 11.0+
20    ///
21    /// ## Framework
22    /// * ClassKit
23    #[serde(
24        rename = "com.apple.developer.ClassKit-environment",
25        skip_serializing_if = "Option::is_none",
26        serialize_with = "crate::serialize_enum_option"
27    )]
28    pub classkit_environment: Option<ClassKitEnvironment>,
29    /// A Boolean value that indicates whether an app may create an assessment session.
30    ///
31    /// Use an AEAssessmentSession instance to put a device into a state that prevents
32    /// users from accessing certain system features during high-stakes assessment
33    /// activities, such as administering an exam. Your app needs the
34    /// com.apple.developer.automatic-assessment-configuration entitlement to create an
35    /// assessment session.
36    ///
37    /// To add the entitlement to your app, set the entitlement’s type to Boolean in the
38    /// Xcode property list editor, and the corresponding value to YES.
39    ///
40    /// Before your app can use this entitlement, you must first get permission to use it.
41    /// Request permission by filling in the Automatic Assessment Configuration
42    /// Entitlement Request form.
43    ///
44    /// ### Important
45    /// If your app has a deployment target earlier than macOS 11, to use the
46    /// com.apple.developer.automatic-assessment-configuration entitlement, your app also
47    /// needs the com.apple.security.temporary-exception.mach-lookup.global-name
48    /// entitlement. Add this to your app’s entitlements file with a corresponding
49    /// value that’s an array of strings containing the string com.apple.assessmentagent.
50    ///
51    /// ## Availability
52    /// * iOS 13.4+
53    /// * macOS 10.15.4+
54    ///
55    /// ## Framework
56    /// * Automatic Assessment Configuration
57    #[serde(
58        rename = "com.apple.developer.automatic-assessment-configuration",
59        serialize_with = "crate::serialize_option",
60        skip_serializing_if = "Option::is_none"
61    )]
62    pub automatic_assessment_configuration: Option<bool>,
63}
64
65/// ClassKit Environment Entitlement
66#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq)]
67pub enum ClassKitEnvironment {
68    /// The environment used to develop and test your app locally, without requiring a
69    /// Managed Apple ID issued by an educational institution.
70    #[serde(rename = "development")]
71    Development,
72    /// The environment used by customers of your app who have a Managed Apple ID. This
73    /// enviroment enables teachers and students to share data through iCloud.
74    #[serde(rename = "production")]
75    Production,
76}