Skip to content

Commit 8c8e33c

Browse files
authored
feat(ios): add bundled resources for privacy manifest (#621)
1 parent 55414e1 commit 8c8e33c

File tree

3 files changed

+65
-0
lines changed

3 files changed

+65
-0
lines changed

README.md

+14
Original file line numberDiff line numberDiff line change
@@ -880,3 +880,17 @@ function createDirectory(rootDirEntry) {
880880
```
881881
882882
When creating subfolders, you need to create each folder separately as shown in the preceding code.
883+
884+
---
885+
886+
## iOS Privacy Manifest
887+
888+
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 `cordova-ios@7.1.0`, APIs are available for configuring the privacy manifest file from `config.xml`.
889+
890+
This plugin comes pre-bundled with a `PrivacyInfo.xcprivacy` file that contains the list of APIs it uses and the reasons for using them.
891+
892+
However, as an app developer, it will be your responsibility to identify additional information explaining what your app does with that data.
893+
894+
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`.
895+
896+
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.

plugin.xml

+2
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,8 @@ to config.xml in order for the application to find previously stored files.
197197

198198
<framework src="AssetsLibrary.framework" />
199199
<framework src="MobileCoreServices.framework" />
200+
201+
<resource-file src="src/ios/CDVFile.bundle" target="CDVFile.bundle" />
200202
</platform>
201203

202204
<!-- osx -->
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
Licensed to the Apache Software Foundation (ASF) under one
4+
or more contributor license agreements. See the NOTICE file
5+
distributed with this work for additional information
6+
regarding copyright ownership. The ASF licenses this file
7+
to you under the Apache License, Version 2.0 (the
8+
"License"); you may not use this file except in compliance
9+
with the License. You may obtain a copy of the License at
10+
11+
http://www.apache.org/licenses/LICENSE-2.0
12+
13+
Unless required by applicable law or agreed to in writing,
14+
software distributed under the License is distributed on an
15+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16+
KIND, either express or implied. See the License for the
17+
specific language governing permissions and limitations
18+
under the License.
19+
-->
20+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
21+
<plist version="1.0">
22+
<dict>
23+
<key>NSPrivacyTracking</key>
24+
<false/>
25+
<key>NSPrivacyTrackingDomains</key>
26+
<array/>
27+
<key>NSPrivacyAccessedAPITypes</key>
28+
<array>
29+
<dict>
30+
<key>NSPrivacyAccessedAPIType</key>
31+
<string>NSPrivacyAccessedAPICategoryDiskSpace</string>
32+
<key>NSPrivacyAccessedAPITypeReasons</key>
33+
<array>
34+
<string>E174.1</string>
35+
</array>
36+
</dict>
37+
<dict>
38+
<key>NSPrivacyAccessedAPIType</key>
39+
<string>NSPrivacyAccessedAPICategoryFileTimestamp</string>
40+
<key>NSPrivacyAccessedAPITypeReasons</key>
41+
<array>
42+
<string>C617.1</string>
43+
</array>
44+
</dict>
45+
</array>
46+
<key>NSPrivacyCollectedDataTypes</key>
47+
<array/>
48+
</dict>
49+
</plist>

0 commit comments

Comments
 (0)