This repository has been archived by the owner on Jan 9, 2023. It is now read-only.
CB-11455: (ios) Add mandatory iOS 10 privacy description #129
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.
Platforms affected
iOS
What does this PR do?
Adds mandatory iOS 10 privacy description; since iOS 6 Apple provided a way to show the user why a certain permission is required. In iOS 10 this becomes mandatory, so any app not specifying the key will crash at runtime when a permissions is requested.
This plugin requests the Contacts permission, so at the very least we need to add
NSContactsUsageDescription
to theplist
.Note that this is the same approach as the Geolocation plugin has taken a while ago.
What testing has been done on this change?
Deployed this plugin in an app on iOS 10 (developer preview) which crashed as expect upon permission request. After adding the
plist
key the crash disappeared and since the value of the description is empty the UI is the same as before. It is recommended by Apple though to actually provide a description. But at least this is way better than a crash :)Checklist