-
Notifications
You must be signed in to change notification settings - Fork 426
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ios): add bundled resources for privacy manifest (#193)
- Loading branch information
Showing
3 changed files
with
88 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -305,3 +305,48 @@ var boolean = device.isiOSAppOnMac; | |
### Supported Platforms | ||
|
||
- iOS | ||
|
||
--- | ||
|
||
## iOS Privacy Manifest | ||
|
||
As of May 1, 2024, Apple requires a privacy manifest file to be created for apps and third-party SDKs. The purpose of the privacy manifest file is to explain the data being collected and the reasons for the required APIs it uses. Starting with `[email protected]`, APIs are available for configuring the privacy manifest file from `config.xml`. | ||
|
||
This plugin comes pre-bundled with a `PrivacyInfo.xcprivacy` file that contains the list of APIs it uses and the reasons for using them. | ||
|
||
However, as an app developer, it will be your responsibility to identify additional information explaining what your app does with that data. | ||
|
||
In this case, you will need to review the "[Describing data use in privacy manifests](https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_data_use_in_privacy_manifests)" to understand the list of known `NSPrivacyCollectedDataTypes` and `NSPrivacyCollectedDataTypePurposes`. | ||
|
||
For example, if you collected the device ID for app functionality and analytics, you would write the following in `config.xml`: | ||
|
||
```xml | ||
<platform name="ios"> | ||
<privacy-manifest> | ||
<key>NSPrivacyTracking</key> | ||
<false/> | ||
<key>NSPrivacyTrackingDomains</key> | ||
<array/> | ||
<key>NSPrivacyAccessedAPITypes</key> | ||
<array/> | ||
<key>NSPrivacyCollectedDataTypes</key> | ||
<array> | ||
<dict> | ||
<key>NSPrivacyCollectedDataType</key> | ||
<string>NSPrivacyCollectedDataTypeDeviceID</string> | ||
<key>NSPrivacyCollectedDataTypeLinked</key> | ||
<false/> | ||
<key>NSPrivacyCollectedDataTypeTracking</key> | ||
<false/> | ||
<key>NSPrivacyCollectedDataTypePurposes</key> | ||
<array> | ||
<string>NSPrivacyCollectedDataTypePurposeAnalytics</string> | ||
<string>NSPrivacyCollectedDataTypePurposeAppFunctionality</string> | ||
</array> | ||
</dict> | ||
</array> | ||
</privacy-manifest> | ||
</platform> | ||
``` | ||
|
||
Also, ensure all four keys—`NSPrivacyTracking`, `NSPrivacyTrackingDomains`, `NSPrivacyAccessedAPITypes`, and `NSPrivacyCollectedDataTypes`—are defined, even if you are not making an addition to the other items. Apple requires all to be defined. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
Licensed to the Apache Software Foundation (ASF) under one | ||
or more contributor license agreements. See the NOTICE file | ||
distributed with this work for additional information | ||
regarding copyright ownership. The ASF licenses this file | ||
to you under the Apache License, Version 2.0 (the | ||
"License"); you may not use this file except in compliance | ||
with the License. You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, | ||
software distributed under the License is distributed on an | ||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
KIND, either express or implied. See the License for the | ||
specific language governing permissions and limitations | ||
under the License. | ||
--> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>NSPrivacyTracking</key> | ||
<false/> | ||
<key>NSPrivacyTrackingDomains</key> | ||
<array/> | ||
<key>NSPrivacyAccessedAPITypes</key> | ||
<array> | ||
<dict> | ||
<key>NSPrivacyAccessedAPIType</key> | ||
<string>NSPrivacyAccessedAPICategoryUserDefaults</string> | ||
<key>NSPrivacyAccessedAPITypeReasons</key> | ||
<array> | ||
<string>CA92.1</string> | ||
</array> | ||
</dict> | ||
</array> | ||
<key>NSPrivacyCollectedDataTypes</key> | ||
<array/> | ||
</dict> | ||
</plist> |