Skip to content

Commit

Permalink
chore: Adding xcprivacy file to all targets (#3343)
Browse files Browse the repository at this point in the history
* adding privacy info

* update privacy info for individual targets

* updating README.md to describe the usage of required reason API's

* updating read me

* Update README.md

Co-authored-by: Sebastian Villena <[email protected]>

* Update README.md

Co-authored-by: Sebastian Villena <[email protected]>

* Update README.md

---------

Co-authored-by: Sebastian Villena <[email protected]>
  • Loading branch information
harsh62 and ruisebas authored Nov 7, 2023
1 parent d4b957d commit 46b6563
Show file tree
Hide file tree
Showing 15 changed files with 197 additions and 6 deletions.
8 changes: 8 additions & 0 deletions Amplify/Resources/PrivacyInfo.xcprivacy
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSPrivacyAccessedAPITypes</key>
<array/>
</dict>
</plist>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSPrivacyAccessedAPITypes</key>
<array/>
</dict>
</plist>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSPrivacyAccessedAPITypes</key>
<array/>
</dict>
</plist>
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSPrivacyAccessedAPITypes</key>
<array>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryUserDefaults</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>CA92.1</string>
</array>
</dict>
</array>
</dict>
</plist>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSPrivacyAccessedAPITypes</key>
<array/>
</dict>
</plist>
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSPrivacyAccessedAPITypes</key>
<array>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryUserDefaults</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>CA92.1</string>
</array>
</dict>
</array>
</dict>
</plist>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSPrivacyAccessedAPITypes</key>
<array/>
</dict>
</plist>
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSPrivacyAccessedAPITypes</key>
<array>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryUserDefaults</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>CA92.1</string>
</array>
</dict>
</array>
</dict>
</plist>
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSPrivacyAccessedAPITypes</key>
<array>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryUserDefaults</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>CA92.1</string>
</array>
</dict>
</array>
</dict>
</plist>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSPrivacyAccessedAPITypes</key>
<array/>
</dict>
</plist>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSPrivacyAccessedAPITypes</key>
<array/>
</dict>
</plist>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSPrivacyAccessedAPITypes</key>
<array/>
</dict>
</plist>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSPrivacyAccessedAPITypes</key>
<array/>
</dict>
</plist>
51 changes: 45 additions & 6 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ let amplifyTargets: [Target] = [
exclude: [
"Info.plist",
"Categories/DataStore/Model/Temporal/README.md"
],
resources: [
.copy("Resources/PrivacyInfo.xcprivacy")
]
),
.target(
Expand All @@ -34,6 +37,9 @@ let amplifyTargets: [Target] = [
path: "AmplifyPlugins/Core/AWSPluginsCore",
exclude: [
"Info.plist"
],
resources: [
.copy("Resources/PrivacyInfo.xcprivacy")
]
),
.target(
Expand Down Expand Up @@ -116,6 +122,9 @@ let apiTargets: [Target] = [
exclude: [
"Info.plist",
"AWSAPIPlugin.md"
],
resources: [
.copy("Resources/PrivacyInfo.xcprivacy")
]
),
.testTarget(
Expand Down Expand Up @@ -157,7 +166,10 @@ let authTargets: [Target] = [
.product(name: "AWSCognitoIdentityProvider", package: "aws-sdk-swift"),
.product(name: "AWSCognitoIdentity", package: "aws-sdk-swift")
],
path: "AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin"
path: "AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin",
resources: [
.copy("Resources/PrivacyInfo.xcprivacy")
]
),
.target(
name: "libtommathAmplify",
Expand Down Expand Up @@ -198,6 +210,9 @@ let dataStoreTargets: [Target] = [
exclude: [
"Info.plist",
"Sync/MutationSync/OutgoingMutationQueue/SyncMutationToCloudOperation.mmd"
],
resources: [
.copy("Resources/PrivacyInfo.xcprivacy")
]
),
.testTarget(
Expand All @@ -224,6 +239,9 @@ let storageTargets: [Target] = [
path: "AmplifyPlugins/Storage/Sources/AWSS3StoragePlugin",
exclude: [
"Resources/Info.plist"
],
resources: [
.copy("Resources/PrivacyInfo.xcprivacy")
]
),
.testTarget(
Expand Down Expand Up @@ -251,6 +269,9 @@ let geoTargets: [Target] = [
path: "AmplifyPlugins/Geo/Sources/AWSLocationGeoPlugin",
exclude: [
"Resources/Info.plist"
],
resources: [
.copy("Resources/PrivacyInfo.xcprivacy")
]
),
.testTarget(
Expand Down Expand Up @@ -279,7 +300,10 @@ let internalPinpointTargets: [Target] = [
.product(name: "AWSPinpoint", package: "aws-sdk-swift"),
.product(name: "AmplifyUtilsNotifications", package: "amplify-swift-utils-notifications")
],
path: "AmplifyPlugins/Internal/Sources/InternalAWSPinpoint"
path: "AmplifyPlugins/Internal/Sources/InternalAWSPinpoint",
resources: [
.copy("Resources/PrivacyInfo.xcprivacy")
]
),
.testTarget(
name: "InternalAWSPinpointUnitTests",
Expand All @@ -298,7 +322,10 @@ let analyticsTargets: [Target] = [
dependencies: [
.target(name: "InternalAWSPinpoint")
],
path: "AmplifyPlugins/Analytics/Sources/AWSPinpointAnalyticsPlugin"
path: "AmplifyPlugins/Analytics/Sources/AWSPinpointAnalyticsPlugin",
resources: [
.copy("Resources/PrivacyInfo.xcprivacy")
]
),
.testTarget(
name: "AWSPinpointAnalyticsPluginUnitTests",
Expand All @@ -316,7 +343,10 @@ let pushNotificationsTargets: [Target] = [
dependencies: [
.target(name: "InternalAWSPinpoint")
],
path: "AmplifyPlugins/Notifications/Push/Sources/AWSPinpointPushNotificationsPlugin"
path: "AmplifyPlugins/Notifications/Push/Sources/AWSPinpointPushNotificationsPlugin",
resources: [
.copy("Resources/PrivacyInfo.xcprivacy")
]
),
.testTarget(
name: "AWSPinpointPushNotificationsPluginUnitTests",
Expand All @@ -343,7 +373,10 @@ let predictionsTargets: [Target] = [
.product(name: "AWSTranslate", package: "aws-sdk-swift")
],
path: "AmplifyPlugins/Predictions/AWSPredictionsPlugin",
exclude: []
exclude: [],
resources: [
.copy("Resources/PrivacyInfo.xcprivacy")
]
),
.testTarget(
name: "AWSPredictionsPluginUnitTests",
Expand All @@ -359,6 +392,9 @@ let predictionsTargets: [Target] = [
path: "AmplifyPlugins/Predictions/CoreMLPredictionsPlugin",
exclude: [
"Resources/Info.plist"
],
resources: [
.copy("Resources/PrivacyInfo.xcprivacy")
]
),
.testTarget(
Expand All @@ -380,7 +416,10 @@ let loggingTargets: [Target] = [
.target(name: "AWSPluginsCore"),
.product(name: "AWSCloudWatchLogs", package: "aws-sdk-swift"),
],
path: "AmplifyPlugins/Logging/Sources/AWSCloudWatchLoggingPlugin"
path: "AmplifyPlugins/Logging/Sources/AWSCloudWatchLoggingPlugin",
resources: [
.copy("Resources/PrivacyInfo.xcprivacy")
]
),
.testTarget(
name: "AWSCloudWatchLoggingPluginTests",
Expand Down
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,18 @@ do {
}
```

## Describing use of required reason API

As required by the Apple App Store, we provide the new `PrivacyInfo.xcprivacy` file for describing use of required reason API, see [Describing use of required reason API
](https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_use_of_required_reason_api). You can also export the privacy report after archiving your App in Xcode, see [Create your app’s privacy report](https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_data_use_in_privacy_manifests#4239187).

The following Amplify targets have been identified to be using the [User defaults APIs](https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_use_of_required_reason_api#4278401):

* `AWSCognitoAuthPlugin`
* `AWSDataStorePlugin`
* `AWSCloudWatchLoggingPlugin`
* `InternalAWSPinpoint`

## Reporting Bugs/Feature Requests

[![Open Bugs](https://img.shields.io/github/issues/aws-amplify/amplify-swift/bug?color=d73a4a&label=bugs)](https://github.com/aws-amplify/amplify-swift/issues?q=is%3Aissue+is%3Aopen+label%3Abug)
Expand Down

0 comments on commit 46b6563

Please sign in to comment.