gpt4 book ai didi

ios - cordova ios 项目中 config.xml 中
转载 作者:可可西里 更新时间:2023-11-01 04:37:07 25 4
gpt4 key购买 nike

我更新了一个 iOS 应用程序,但它被拒绝了,邮件如下

Missing Info.plist key - This app attempts to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSPhotoLibraryUsageDescription key with a string value explaining to the user how the app uses this data.

我尝试将以下 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>

但我不确定我需要在哪个标签下

我的 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>

谢谢你的帮助

编辑 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>

最佳答案

see docs

在你的config.xml作为 <platform name="ios"> 的子节点添加:

<edit-config target="NSPhotoLibraryUsageDescription" file="*-Info.plist" mode="merge">
<string>need to photo library access to get pictures from there</string>
</edit-config>

关于ios - cordova ios 项目中 config.xml 中 <edit-config 的父标记是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48454081/

25 4 0

Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com