[ 
https://issues.apache.org/jira/browse/CB-13265?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16234928#comment-16234928
 ] 

ASF GitHub Bot commented on CB-13265:
-------------------------------------

stevengill closed pull request #148: CB-13265 Remove ios usage description from 
media plugin
URL: https://github.com/apache/cordova-plugin-media/pull/148
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/README.md b/README.md
index 577cd388..a8fe2186 100644
--- a/README.md
+++ b/README.md
@@ -566,13 +566,19 @@ function recordAudio() {
 
         var myMedia = new Media("documents://beer.mp3")
 
-- Since iOS 10 it's mandatory to add a `NSMicrophoneUsageDescription` entry 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.
 
-`NSMicrophoneUsageDescription` describes the reason that the app accesses the 
user’s microphone. 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 variable `MICROPHONE_USAGE_DESCRIPTION` on plugin install.
+This plugins requires the following usage description:
 
-Example: `cordova plugin add cordova-plugin-media --variable 
MICROPHONE_USAGE_DESCRIPTION="your usage message"`
+* `NSMicrophoneUsageDescription` describes the reason that the app accesses 
the user's microphone. 
 
-If you don't pass the variable, the plugin will add an empty string as value.
+To add this entry into the `info.plist`, you can use the `edit-config` tag in 
the `config.xml` like this:
+
+```
+<edit-config target="NSMicrophoneUsageDescription" file="*-Info.plist" 
mode="merge">
+    <string>need microphone access to record sounds</string>
+</edit-config>
+```
 
 ### Windows Quirks
 
diff --git a/plugin.xml b/plugin.xml
index 157bcd18..2fac5412 100644
--- a/plugin.xml
+++ b/plugin.xml
@@ -106,10 +106,6 @@ id="cordova-plugin-media"
         </config-file>
         <header-file src="src/ios/CDVSound.h" />
         <source-file src="src/ios/CDVSound.m" />
-        <preference name="MICROPHONE_USAGE_DESCRIPTION" default=" " />
-        <config-file target="*-Info.plist" 
parent="NSMicrophoneUsageDescription">
-            <string>$MICROPHONE_USAGE_DESCRIPTION</string>
-        </config-file>
     </platform>
 
     <!-- blackberry10 -->


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> Remove ios usage description from media plugin
> ----------------------------------------------
>
>                 Key: CB-13265
>                 URL: https://issues.apache.org/jira/browse/CB-13265
>             Project: Apache Cordova
>          Issue Type: Sub-task
>            Reporter: jcesarmobile
>            Assignee: jcesarmobile
>            Priority: Major
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to