Aug*_*eph 5 ios cordova cordova-plugins cordova-plugin-camera
我更新了一个iOS应用程序,它被以下电子邮件拒绝了
缺少Info.plist密钥 - 此应用程序尝试在没有使用说明的情况下访问隐私敏感数据.应用程序的Info.plist必须包含一个NSPhotoLibraryUsageDescription键,其中包含一个字符串值,向用户解释应用程序如何使用此数据.
我尝试将以下xml标记添加到config.xml.
<edit-config file="*-Info.plist" mode="merge" target="NSCameraUsageDescription">
<string>Need camera access to take pictures</string>
</edit-config>
<edit-config file="*-Info.plist" mode="merge" target="NSPhotoLibraryUsageDescription">
<string>Need to photo library access to get pictures from there</string>
</edit-config>
Run Code Online (Sandbox Code Playgroud)
但我不确定我需要哪个标签
我的config.xml文件.
<?xml version='1.0' encoding='utf-8'?>
<widget id="com.aotsinc.christian.iphone.biblequizcompanion" version="3.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>Bible Quiz Companion</name>
<description>
Bible Quiz Companion is a free app useful for the users to prepare for Jounior Bible Quiz Compatition.
</description>
<author email="dev@cordova.apache.org" href="http://cordova.io">
Alpha Omega Tech Solutions Inc.
</author>
<content src="index.html" />
<access origin="*" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
<allow-intent href="tel:*" />
<allow-intent href="sms:*" />
<allow-intent href="mailto:*" />
<allow-intent href="geo:*" />
<platform name="android">
<allow-intent href="market:*" />
</platform>
<platform name="ios">
<allow-intent href="itms:*" />
<allow-intent href="itms-apps:*" />
</platform>
<engine name="ios" spec="^4.5.4" />
<plugin name="cordova-plugin-whitelist" spec="^1.3.3" />
<plugin name="cordova-plugin-x-socialsharing" spec="^5.2.1" />
<plugin name="cordova-plugin-camera" spec="^4.0.1" />
<plugin name="cordova-plugin-tts" spec="^0.2.3" />
<plugin name="cordova-plugin-apprate" spec="^1.3.0" />
<plugin name="com.darktalker.cordova.screenshot" spec="git+https://github.com/gitawego/cordova-screenshot.git" />
</widget>
Run Code Online (Sandbox Code Playgroud)
谢谢你的帮助
编辑1
我尝试在相机插件中添加您在plugin.xml中提供的代码,如下所示.但是我没有在info.plist中看到这个条目.你能否告诉我plugin.xml中的更改是否正确.谢谢
<platform name="ios">
<config-file target="config.xml" parent="/*">
<feature name="Camera">
<param name="ios-package" value="CDVCamera" />
</feature>
<preference name="CameraUsesGeolocation" value="false" />
</config-file>
<js-module src="www/ios/CameraPopoverHandle.js" name="CameraPopoverHandle">
<clobbers target="CameraPopoverHandle" />
</js-module>
<preference name="CAMERA_USAGE_DESCRIPTION" default=" " />
<config-file target="*-Info.plist" parent="NSCameraUsageDescription">
<string>Need camera access to take pictures</string>
</config-file>
<preference name="PHOTOLIBRARY_USAGE_DESCRIPTION" default=" " />
<config-file target="*-Info.plist" parent="NSPhotoLibraryUsageDescription">
<string>Need to photo library access to get pictures from there</string>
</config-file>
<header-file src="src/ios/UIImage+CropScaleOrientation.h" />
<source-file src="src/ios/UIImage+CropScaleOrientation.m" />
<header-file src="src/ios/CDVCamera.h" />
<source-file src="src/ios/CDVCamera.m" />
<header-file src="src/ios/CDVJpegHeaderWriter.h" />
<source-file src="src/ios/CDVJpegHeaderWriter.m" />
<header-file src="src/ios/CDVExif.h" />
<framework src="ImageIO.framework" weak="true" />
<framework src="CoreLocation.framework" />
<framework src="CoreGraphics.framework" />
<framework src="AssetsLibrary.framework" />
<framework src="MobileCoreServices.framework" />
<framework src="CoreGraphics.framework" />
<framework src="AVFoundation.framework" />
</platform>
Run Code Online (Sandbox Code Playgroud)
在需要此功能的插件的PLUGIN.XML文件中的PLATFORM标记下使用config-file而不是edit-config :
<platform name="ios">
<preference name="CAMERA_USAGE_DESCRIPTION" default=" " />
<config-file target="*-Info.plist" parent="NSCameraUsageDescription">
<string>Need camera access to take pictures</string>
</config-file>
<preference name="PHOTOLIBRARY_USAGE_DESCRIPTION" default=" " />
<config-file target="*-Info.plist" parent="NSPhotoLibraryUsageDescription">
<string>Need to photo library access to get pictures from there</string>
</config-file>
</platform>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3402 次 |
| 最近记录: |