You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by jc...@apache.org on 2017/10/21 13:19:37 UTC

cordova-plugin-media-capture git commit: CB-13266 (ios): Remove ios usage descriptions

Repository: cordova-plugin-media-capture
Updated Branches:
  refs/heads/master af54359e4 -> 0634acbb6


CB-13266 (ios): Remove ios usage descriptions

 This closes #83


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/commit/0634acbb
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/tree/0634acbb
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/diff/0634acbb

Branch: refs/heads/master
Commit: 0634acbb66652d150b20f2f6cb835cf7af9eccba
Parents: af54359
Author: Julio César <jc...@gmail.com>
Authored: Sat Oct 14 17:33:52 2017 +0200
Committer: Julio César <jc...@gmail.com>
Committed: Sat Oct 21 15:18:11 2017 +0200

----------------------------------------------------------------------
 README.md  | 34 +++++++++++++++++++++-------------
 plugin.xml | 15 ---------------
 2 files changed, 21 insertions(+), 28 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/blob/0634acbb/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index 67c6747..78ba926 100644
--- a/README.md
+++ b/README.md
@@ -200,26 +200,34 @@ object featuring a `CaptureError.CAPTURE_NO_MEDIA_FILES` error code.
 
 ### iOS Quirks
 
-Since iOS 10 it's mandatory to add a `NSCameraUsageDescription`, `NSMicrophoneUsageDescription` and `NSPhotoLibraryUsageDescriptionentry` in the info.plist.
+Since iOS 10 it's mandatory to provide an usage description in the `info.plist` if trying to access privacy-sensitive data. When the system prompts the user to allow access, this usage description string will displayed as part of the permission dialog box, but if you didn't provide the usage description, the app will crash before showing the dialog. Also, Apple will reject apps that access private data but don't provide an usage description.
 
-* `NSCameraUsageDescription` describes the reason that the app accesses the user’s camera.
-* `NSMicrophoneUsageDescription` describes the reason that the app accesses the user’s microphone.
-* `NSPhotoLibraryUsageDescriptionentry` describes the reason the app accesses the user's photo library.
+This plugins requires the following usage descriptions:
 
-When the system prompts the user to allow access, this string is displayed as part of the dialog box.
+* `NSCameraUsageDescription` describes the reason the app accesses the user's camera.
+* `NSMicrophoneUsageDescription` describes the reason the app accesses the user's microphone.
+* `NSPhotoLibraryUsageDescriptionentry` describes the reason the app accesses the user's photo library.
 
-To add this entry you can pass the following variables on plugin install.
 
-* `CAMERA_USAGE_DESCRIPTION` for `NSCameraUsageDescription`
-* `MICROPHONE_USAGE_DESCRIPTION` for `NSMicrophoneUsageDescription`
-* `PHOTOLIBRARY_USAGE_DESCRIPTION` for `NSPhotoLibraryUsageDescriptionentry`
+To add these entries into the `info.plist`, you can use the `edit-config` tag in the `config.xml` like this:
 
--
-Example:
+```
+<edit-config target="NSCameraUsageDescription" file="*-Info.plist" mode="merge">
+    <string>need camera access to take pictures</string>
+</edit-config>
+```
 
-`cordova plugin add cordova-plugin-media-capture --variable CAMERA_USAGE_DESCRIPTION="your usage message"`
+```
+<edit-config target="NSMicrophoneUsageDescription" file="*-Info.plist" mode="merge">
+    <string>need microphone access to record sounds</string>
+</edit-config>
+```
 
-If you don't pass the variable, the plugin will add an empty string as value.
+```
+<edit-config target="NSPhotoLibraryUsageDescription" file="*-Info.plist" mode="merge">
+    <string>need to photo library access to get pictures from there</string>
+</edit-config>
+```
 
 ### Windows Phone 7 Quirks
 

http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/blob/0634acbb/plugin.xml
----------------------------------------------------------------------
diff --git a/plugin.xml b/plugin.xml
index 9e30a85..02ef7fd 100644
--- a/plugin.xml
+++ b/plugin.xml
@@ -149,21 +149,6 @@ xmlns:rim="http://www.blackberry.com/ns/widgets"
         <framework src="CoreGraphics.framework" />
         <framework src="MobileCoreServices.framework" />
 
-        <preference name="CAMERA_USAGE_DESCRIPTION" default=" " />
-        <config-file target="*-Info.plist" parent="NSCameraUsageDescription">
-            <string>$CAMERA_USAGE_DESCRIPTION</string>
-        </config-file>
-
-        <preference name="MICROPHONE_USAGE_DESCRIPTION" default=" " />
-        <config-file target="*-Info.plist" parent="NSMicrophoneUsageDescription">
-            <string>$MICROPHONE_USAGE_DESCRIPTION</string>
-        </config-file>
-
-        <preference name="PHOTOLIBRARY_USAGE_DESCRIPTION" default=" " />
-        <config-file target="*-Info.plist" parent="NSPhotoLibraryUsageDescription">
-            <string>$PHOTOLIBRARY_USAGE_DESCRIPTION</string>
-        </config-file>
-
     </platform>
 
     <!-- blackberry10 -->


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org