Skip to content
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

Closed
wants to merge 1 commit into from

Conversation

EddyVerbruggen
Copy link

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 the plist.

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

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 relies requests the Contacts permission, so at the very least we need to add `NSContactsUsageDescription` to the `plist`.

Note that this is the same approach as the Geolocation plugin has taken a while ago.
@cordova-qa
Copy link

Cordova CI Build has completed successfully.

Commit - Link
Dashboard - Link

Builder Name Console Output Test Report Device Logs
Windows 8.1 Store Link Link Link
Windows 10 Store Link Link Link
Windows 8.1 Phone Link Link Link
iOS Link Link Link
Android Link Link Link

@jcesarmobile
Copy link
Member

Hi.
I have sent a new PR (#131) where the usage description can be added as a variable on plugin install or use an empty string if no variable is passed. I also documented it as iOS quirk, so you can close this PR, and help review mine if you want.

BTW, can you use my approach on the PR you sent to the barcode scanner plugin?

@jcesarmobile
Copy link
Member

jcesarmobile commented Aug 30, 2016

@EddyVerbruggen, #131 was merged, you can close this

@asfgit asfgit closed this in d7d4963 Sep 23, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants