cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jcesarmob...@apache.org
Subject cordova-plugin-media-capture git commit: CB-11821 (ios) Add mandatory iOS 10 privacy description
Date Thu, 08 Sep 2016 07:06:39 GMT
Repository: cordova-plugin-media-capture
Updated Branches:
  refs/heads/master f108e236d -> cba6b7ef7


CB-11821 (ios) Add mandatory iOS 10 privacy description

 This closes #69


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/cba6b7ef
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/tree/cba6b7ef
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/diff/cba6b7ef

Branch: refs/heads/master
Commit: cba6b7ef7351b0fd17e9dd9151117483dd0303b1
Parents: f108e23
Author: Julio Cesar Sanchez Hernandez <jcesarmobile@gmail.com>
Authored: Wed Sep 7 20:25:55 2016 +0200
Committer: Julio César <jcesarmobile@gmail.com>
Committed: Thu Sep 8 09:06:13 2016 +0200

----------------------------------------------------------------------
 README.md  | 21 +++++++++++++++++++++
 plugin.xml | 11 +++++++++++
 2 files changed, 32 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/blob/cba6b7ef/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index 28580b0..5421c7c 100644
--- a/README.md
+++ b/README.md
@@ -198,6 +198,27 @@ object featuring a `CaptureError.CAPTURE_NO_MEDIA_FILES` error code.
 - Windows 8
 - Windows
 
+### iOS Quirks
+
+Since iOS 10 it's mandatory to add a `NSCameraUsageDescription` and `NSPhotoLibraryUsageDescriptionentry`
in the info.plist.
+
+* `NSCameraUsageDescription` describes the reason that the app accesses the user’s camera.
+* `NSPhotoLibraryUsageDescriptionentry` describes the reason the app accesses the user's
photo library.
+
+When the system prompts the user to allow access, this string is displayed as part of the
dialog box.
+
+To add this entry you can pass the following variables on plugin install.
+
+* `CAMERA_USAGE_DESCRIPTION` for `NSCameraUsageDescription`
+* `PHOTOLIBRARY_USAGE_DESCRIPTION` for `NSPhotoLibraryUsageDescriptionentry`
+
+-
+Example:
+
+`cordova plugin add cordova-plugin-media-capture --variable CAMERA_USAGE_DESCRIPTION="your
usage message"`
+
+If you don't pass the variable, the plugin will add an empty string as value.
+
 ### Windows Phone 7 Quirks
 
 Invoking the native camera application while your device is connected

http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/blob/cba6b7ef/plugin.xml
----------------------------------------------------------------------
diff --git a/plugin.xml b/plugin.xml
index 9342b4d..66bf818 100644
--- a/plugin.xml
+++ b/plugin.xml
@@ -145,6 +145,17 @@ 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="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


Mime
View raw message