ios – PhoneGap缺少plist.key

ios – PhoneGap缺少plist.key,第1张

概述当我尝试加载上传我的iTunes应用程序安装程序到iTunes时,我解除了这个错误: Missing Info.plist key – This app attempts to access privacy-sensitive data without a usage description. The app’s Info.plist must contain an NSPhotoLibraryU 当我尝试加载上传我的iTunes应用程序安装程序到iTunes时,我解除了这个错误:

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.

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

我可以在下面的配置文件中添加什么来让它工作:

<preference name="permissions" value="none" />    <preference name="orIEntation" value="default" />    <preference name="target-device" value="universal" />    <preference name="fullscreen" value="false" />    <preference name="webvIEwbounce" value="false" />    <preference name="disallowOverscroll" value="true" />    <preference name="prerendered-icon" value="true" />    <preference name="stay-in-webvIEw" value="false" />    <preference name="ios-statusbarstyle" value="black-opaque" />    <preference name="detect-data-types" value="true" />    <preference name="exit-on-suspend" value="false" />    <preference name="show-splash-screen-spinner" value="true" />    <preference name="auto-hIDe-splash-screen" value="true" />    <preference name="disable-cursor" value="false" />    <preference name="androID-minSdkVersion" value="10" />    <preference name="androID-targetSdkVersion" value="19" />    <preference name="androID-installLocation" value="auto" />    <gap:plugin name="org.apache.cordova.battery-status" source="npm" />    <gap:plugin name="org.apache.cordova.camera" source="npm"/>        <gap:plugin name="org.apache.cordova.media-capture" source="npm"/>    <gap:plugin name="org.apache.cordova.console" source="npm" />    <gap:plugin name="org.apache.cordova.contacts" source="npm"/>    <gap:plugin name="org.apache.cordova.device-motion" source="npm"/>    <gap:plugin name="org.apache.cordova.device-orIEntation" source="npm"/>    <gap:plugin name="org.apache.cordova.dialogs" source="npm"/>    <gap:plugin name="org.apache.cordova.file" source="npm"/>    <gap:plugin name="org.apache.cordova.file-transfer" source="npm"/>    <gap:plugin name="org.apache.cordova.inappbrowser" source="npm"/>    <gap:plugin name="org.apache.cordova.media" source="npm"/>    <gap:plugin name="org.apache.cordova.network-information" source="npm"/>    <gap:plugin name="org.apache.cordova.splashscreen" source="npm"/>    <gap:plugin name="org.apache.cordova.vibration" source="npm"/>    <icon src="icon.png" />    <gap:splash src="splash.png" gap:platform="androID" gap:qualifIEr="port-ldpi" />    <gap:splash src="splash.png" gap:platform="androID" gap:qualifIEr="port-mdpi" />    <gap:splash src="splash.png" gap:platform="androID" gap:qualifIEr="port-hdpi" />    <gap:splash src="splash.png" gap:platform="androID" gap:qualifIEr="port-xhdpi" />    <gap:splash src="splash.png" gap:platform="blackBerry" />    <gap:splash src="splash.png" gap:platform="ios" wIDth="320" height="480" />    <gap:splash src="splash.png" gap:platform="ios" wIDth="640" height="960" />    <gap:splash src="splash.png" gap:platform="ios" wIDth="640" height="1136" />    <gap:splash src="splash.png" gap:platform="ios" wIDth="768" height="1024" />    <gap:splash src="splash.png" gap:platform="ios" wIDth="1024" height="768" />    <gap:splash src="splash.png" gap:platform="winphone" />    <access origin="*" />    <gap:plugin name=" phonegap-plugin-barcodescanner" source="npm" />    <gap:plugin name="uk.co.workingedge.phonegap.plugin.launchnavigator" source="npm" />    <gap:plugin name="cordova-plugin-directions" source="npm" />    <!-- iPhone / iPod touch  - lower 4s -->    <icon src="icon-57.png" gap:platform="ios" wIDth="57" height="57" />    <icon src="icon.png" gap:platform="ios" wIDth="114" height="114" />    <icon src="icon-72.png" gap:platform="ios" wIDth="72" height="72" />    <icon src="152.png" gap:platform="ios" wIDth="152" height="152" />    <icon src="icon-120.png" gap:platform="ios" wIDth="120" height="120" />    <icon src="76.png" gap:platform="ios" wIDth="76" height="76" />    <icon src="icon-40.png" gap:platform="ios" wIDth="40" height="40" />    <!-- iPhone / iPod touch - 5-5s -->    <icon src="icon.png" gap:platform="ios" wIDth="60" height="60" />    <icon src="icon.png" gap:platform="ios" wIDth="120" height="120" />    <!-- iPhone6-6+ -->    <icon src="icon.png" gap:platform="ios" wIDth="180" height="180" />    <!-- Settings Icon -->    <icon src="icon-29.png" gap:platform="ios" wIDth="29" height="29" />    <icon src="icon.png" gap:platform="ios" wIDth="58" height="58" />    <!-- Spotlight Icon -->    <icon src="icon.png" gap:platform="ios" wIDth="40" height="40" />    <icon src="icon.png" gap:platform="ios" wIDth="80" height="80" />    <plugin name="cordova-plugin-whiteList" version="1" source="npm"/>    <gap:plugin name="cordova-plugin-geolocation" source="npm"/>    <feature name="http://API.phonegap.com/1.0/battery" />    <feature name="http://API.phonegap.com/1.0/camera" />    <feature name="http://API.phonegap.com/1.0/network" />    <feature name="http://API.phonegap.com/1.0/notification" />    <gap:plugin name="cordova-plugin-x-socialsharing" source="npm" />
解决方法 另一个编辑:
大多数插件都删除了变量以获取用法描述,所以现在设置它们的方法就是在config.xml中使用edit-config标签.
<edit-config target="NSCameraUsageDescription" file="*-Info.pList" mode="overwrite">    <string>We are using the Camera for something...</string></edit-config>

但并非所有插件都已更新,所以最好先阅读插件的README.md.在核心插件上,它位于一个名为iOS Quirks的部分中.

它还需要cli 7.0.1或更新版本,在config.xml中设置如下:

<preference name="phonegap-version" value="cli-8.0.0" />

编辑:

如果你有< preference name ='phonegap-version'value ='cli-7.0.1'/>,我的旧答案将不再适用(或者,如果你没有任何phonegap版本,因为它将默认使用它)

要设置使用说明,请使用插件上的参数

<plugin name="cordova-plugin-camera">   <param name="CAMERA_USAGE_DESCRIPTION" value="We are using the Camera for something..." />   <param name="PHOTOliBRARY_USAGE_DESCRIPTION" value="We are using the Photo library for something..." /></plugin>

请注意,如果您的某些插件具有相同的使用说明,并且未使用param标签填充它们,则可能会使用默认的空字符串替换它们

您可以强制使用带有此标记的旧构建器,但不建议这样做,新构建器更好
< preference name ='pgb-builder-version'value ='1'/>

老答案:

您可以像这样在info.pList中写入:

<gap:config-file platform="ios" parent="NSCameraUsageDescription" overwrite="true">   <string>We are using the Camera for something...</string></gap:config-file>

overwrite =“true”很重要,因为相机插件的最新版本已经写入空值.

我在一个示例应用程序上测试了它并且它正在工作
https://github.com/jcesarmobile/phonegap-template-hello-world/blob/454e852955e66470890cba636450abd422f50598/config.xml#L153-L155

总结

以上是内存溢出为你收集整理的ios – PhoneGap缺少plist.key全部内容,希望文章能够帮你解决ios – PhoneGap缺少plist.key所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/web/1108689.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-05-29
下一篇2022-05-29

发表评论

登录后才能评论

评论列表(0条)

    保存