NSCameraUsageDescription,NSPhotoLibraryUsageDescription和NSMicrophoneUsageDescription的Cordova / PhoneGap插件权限设置

时间:2017-07-05 10:55:26

标签: ios cordova camera phonegap-build image-gallery

  

应用尝试在不使用的情况下访问隐私敏感数据   描述。该应用的Info.plist必须包含一个   NSPhotoLibraryUsageDescription键,其字符串值解释为   用户应用程序如何使用此数据

1 个答案:

答案 0 :(得分:0)

  

Cordova / PhoneGap插件权限设置   NSCameraUsageDescription,NSPhotoLibraryUsageDescription和   iOS中的NSMicrophoneUsageDescription通过添加声明   Config.xml文件

<plugin name="cordova-plugin-media-capture" source="npm" spec="*">
  <variable name="CAMERA_USAGE_DESCRIPTION" value="App would like to access the camera." />
  <variable name="MICROPHONE_USAGE_DESCRIPTION" value="App would like to access the microphone." />
  <variable name="PHOTOLIBRARY_USAGE_DESCRIPTION" value="App would like to access the library." />
</plugin>