Privacy manifest inclusion for SPM and Cocoapods #55
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Due to upcoming https://developer.apple.com/support/third-party-SDK-requirements/ we've updated the SDK to include a Privacy Manifest.
The format and purpose of these is described here: https://developer.apple.com/documentation/bundleresources/privacy_manifest_files
The crux of what I've gone for on here is:
UserDefaults: https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_use_of_required_reason_api#4278401
This is needed to store persistent state info for the SDK. At the moment this is just used to store analytics events in the case they can't be sent immediately. This could possibly be removed in the future if you're (a) not that fussed and we (b) post analytics when the app goes to the background to avoid data loss.
Other Diagnostic Data:
https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_data_use_in_privacy_manifests#4144131
I've tested this with the unit tests and also creating local packages with Swift Package Manager and Cocoapods to see if the Privacy Manifest is included, which it does appear to be. When running the new SDK in the example app I didn't see any additional privacy dialogs appear.
I've also checked my changes against other popular iOS SDKs and can confirm they're consistent.
Manifest files are typically checked by Apple automatically when submitting to the App Store, so that's going to be the real test for this one.
Type of Change