Skip to content

Translation 🌍

You can translate or improve the translation of this page.

Contribute

STRUCT

PrivacyManifest

Contents

  • Properties
    • tracking
    • trackingDomains
    • collectedDataTypes
    • accessedApiTypes
  • Methods
    • privacyManifest(tracking:trackingDomains:collectedDataTypes:accessedApiTypes:)
swift
public struct PrivacyManifest: Codable, Equatable, Sendable

Describe the data your app or third-party SDK collects and the reasons required APIs it uses.

Properties

tracking

swift
public var tracking: Bool

A Boolean that indicates whether your app or third-party SDK uses data for tracking as defined under the App Tracking Transparency framework. For more information, see User Privacy and Data Use.

trackingDomains

swift
public var trackingDomains: [String]

An array of strings that lists the internet domains your app or third-party SDK connects to that engage in tracking. If the user has not granted tracking permission through the App Tracking Transparency framework, network requests to these domains fail and your app receives an error. If you set tracking to true then you need to provide at least one internet domain in NSPrivacyTrackingDomains; otherwise, you can provide zero or more domains.

collectedDataTypes

swift
public var collectedDataTypes: [[String: Plist.Value]]

An array of dictionaries that describes the data types your app or third-party SDK collects. For information on the keys and values to use in the dictionaries, see Describing data use in privacy manifests.

accessedApiTypes

swift
public var accessedApiTypes: [[String: Plist.Value]]

An array of dictionaries that describe the API types your app or third-party SDK accesses that have been designated as APIs that require reasons to access. For information on the keys and values to use in the dictionaries, see Describing use of required reason API.

Methods

privacyManifest(tracking:trackingDomains:collectedDataTypes:accessedApiTypes:)

swift
public static func privacyManifest(
    tracking: Bool,
    trackingDomains: [String],
    collectedDataTypes: [[String: Plist.Value]],
    accessedApiTypes: [[String: Plist.Value]]
) -> Self

Returns a PrivacyManifest.

  • Parameter tracking: A Boolean that indicates whether your app or third-party SDK uses data for tracking.
  • Parameter trackingDomains: An array of strings that lists the internet domains your app or third-party SDK connects to that engage in tracking.
  • Parameter collectedDataTypes: An array of dictionaries that describes the data types your app or third-party SDK collects.
  • Parameter accessedApiTypes: An array of dictionaries that describe the API types your app or third-party SDK accesses that have been designated as APIs that require reasons to access.
  • Returns: PrivacyManifest.

Parameters

NameDescription
trackingA Boolean that indicates whether your app or third-party SDK uses data for tracking.
trackingDomainsAn array of strings that lists the internet domains your app or third-party SDK connects to that engage in tracking.
collectedDataTypesAn array of dictionaries that describes the data types your app or third-party SDK collects.
accessedApiTypesAn array of dictionaries that describe the API types your app or third-party SDK accesses that have been designated as APIs that require reasons to access.

Released under the MIT License.