Security

Struct Security 

Source
pub struct Security {
    pub user_tracking_usage_description: Option<String>,
    pub apple_events_usage_description: Option<String>,
    pub system_administration_usage_description: Option<String>,
    pub app_uses_non_exempt_encryption: Option<bool>,
    pub encryption_export_compliance_code: Option<String>,
}
Expand description

Security

Fields§

§user_tracking_usage_description: Option<String>

A message that informs the user why an app is requesting permission to use data for tracking the user or the device.

If your app calls the App Tracking Transparency API, you must provide custom text, known as a usage-description string, which displays as a system-permission alert request. The usage-description string tells the user why the app is requesting permission to use data for tracking the user or the device. The user has the option to grant or deny the authorization request. If you don’t include a usage-description string, your app may crash when a user first launches it.

Make sure your app requests permission to track sometime before tracking occurs. This could be at first launch or when using certain features in your app. For example, when signing on with a third-party SSO.

Set the NSUserTrackingUsageDescription key in the Information Property List (Info.plist):

  1. Select your project’s Info.plist file in Xcode Project navigator.

  2. Modify the file using the Xcode Property List Editor: Privacy - Tracking Usage Description.

  • Use sentence-style capitalization and appropriate ending punctuation. Keep the text short and specific. You don’t need to include your app name because the system already identifies your app.

  • If the title is a sentence fragment, don’t add ending punctuation.

See Apple’s Human Interface Guidelines for example usage descriptions.

§Availability

  • iOS 14.0+
  • tvOS 14.0+

§Framework

  • Security
§apple_events_usage_description: Option<String>

A message that tells the user why the app is requesting the ability to send Apple events.

An app using Apple events to control another app might be able to gain access to sensitive user data. For example, the Mail app stores a lot of personal information in its local database that other apps can’t access directly. But because Mail can be automated with Apple events, other apps can use Mail to gain access to the data indirectly.

§Important

This key is required if your app uses APIs that send Apple events.

§Availability

  • macOS 10.14+

§Framework

  • Security
§system_administration_usage_description: Option<String>

A message in macOS that tells the user why the app is requesting to manipulate the system configuration.

Use this key if your app uses certain APIs that manipulate system configuration, like ODRecordSetValue(::::).

§Important

This key is required if your app uses APIs that manipulate the system configuration.

§Availability

  • macOS 10.14+

§Framework

  • Security
§app_uses_non_exempt_encryption: Option<bool>

A Boolean value indicating whether the app uses encryption.

Set the value for this key to NO in your app’s Information Property List file to indicate that your app—including any third-party libraries you link against—either uses no encryption, or only uses encryption that’s exempt from export compliance requirements, as described in Determine your export compliance requirements. Set the value to YES to indicate that your app uses non-exempt encryption.

If you set the value to YES, you typically also provide a value for the ITSEncryptionExportComplianceCode key. You set that key’s value using a code Apple provides after successfully reviewing your export compliance documentation.

If you don’t have the ITSAppUsesNonExemptEncryption key in your app’s Info.plist file, App Store Connect walks you through an export compliance questionnaire every time you upload a new version of your app. Including the key streamlines the app submission process.

For additional information, see Complying with Encryption Export Regulations.

§Availability

  • macOS 10.0+

§Framework

  • Security
§encryption_export_compliance_code: Option<String>

The export compliance code provided by App Store Connect for apps that require it.

Include this key in your app’s Information Property List file if you set the ITSAppUsesNonExemptEncryption key’s value to YES. Set the value for this key to the code that Apple sends you after successfully reviewing export compliance documentation that you provide through App Store Connect.

For additional information, see Complying with Encryption Export Regulations.

§Availability

  • macOS 10.0+

§Framework

  • Security

Trait Implementations§

Source§

impl Clone for Security

Source§

fn clone(&self) -> Security

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Security

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Security

Source§

fn default() -> Security

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for Security

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for Security

Source§

fn eq(&self, other: &Security) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for Security

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Eq for Security

Source§

impl StructuralPartialEq for Security

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,