Phonegap iOS Appstore在info.plist文件中缺少目的字符串

时间:2019-03-02 04:04:16

标签: ios cordova plist phonegap

我正在使用Phonegap构建应用程序,但一直试图将其提交到应用程序商店一直处于困境。我已经搜索并尝试了不同的方法,但是我无法克服这个问题。

每次提交应用程序时,都会收到以下响应:

  

Info.plist文件中的缺少目的字符串-您的应用代码引用了一个或多个访问敏感用户数据的API。应用程序的Info.plist文件应包含一个NSPhotoLibraryUsageDescription密钥,该密钥具有面向用户的目的字符串,可以清晰,完整地说明您的应用程序为何需要数据。从2019年春季开始,将要求所有提交给App Store的访问用户数据的应用程序都包含目的字符串。

我尝试对config.xml文件进行多次调整,但均未成功。

下面是我的最新试用版

<?xml version='1.0' encoding='utf-8'?>
<widget id="com.domain.app" version="0.1.3"
    xmlns="http://www.w3.org/ns/widgets"
    xmlns:gap="http://phonegap.com/ns/1.0">
    <name>App</name>
    <description>
        Test App
    </description>
    <author email="admin@.com" href="http://www.com">
        Dev Team
    </author>
    <content src="index.html" />
    <preference name="DisallowOverscroll" value="true" />
    <preference name="android-minSdkVersion" value="14" />
    <platform name="android">
        <icon qualifier="ldpi" src="res/icons/android/drawable-ldpi-icon.png" />
        <icon qualifier="mdpi" src="res/icons/android/drawable-mdpi-icon.png" />
        <icon qualifier="hdpi" src="res/icons/android/drawable-hdpi-icon.png" />
        <icon qualifier="xhdpi" src="res/icons/android/drawable-xhdpi-icon.png" />
        <icon qualifier="xxhdpi" src="res/icons/android/drawable-xxhdpi-icon.png" />
        <icon qualifier="xxxhdpi" src="res/icons/android/drawable-xxxhdpi-icon.png" />
        <splash qualifier="land-ldpi" src="res/screens/android/drawable-land-ldpi-screen.png" />
        <splash qualifier="land-mdpi" src="res/screens/android/drawable-land-mdpi-screen.png" />
        <splash qualifier="land-hdpi" src="res/screens/android/drawable-land-hdpi-screen.png" />
        <splash qualifier="land-xhdpi" src="res/screens/android/drawable-land-xhdpi-screen.png" />
        <splash qualifier="land-xxhdpi" src="res/screens/android/drawable-land-xxhdpi-screen.png" />
        <splash qualifier="land-xxxhdpi" src="res/screens/android/drawable-land-xxxhdpi-screen.png" />
        <splash qualifier="port-ldpi" src="res/screens/android/drawable-port-ldpi-screen.png" />
        <splash qualifier="port-mdpi" src="res/screens/android/drawable-port-mdpi-screen.png" />
        <splash qualifier="port-hdpi" src="res/screens/android/drawable-port-hdpi-screen.png" />
        <splash qualifier="port-xhdpi" src="res/screens/android/drawable-port-xhdpi-screen.png" />
        <splash qualifier="port-xxhdpi" src="res/screens/android/drawable-port-xxhdpi-screen.png" />
        <splash qualifier="port-xxxhdpi" src="res/screens/android/drawable-port-xxxhdpi-screen.png" />
    </platform>
    <platform name="ios">
        <preference name="Orientation" value="all" />
        <preference name="AutoHideSplashScreen" value="false" />
        <icon height="57" platform="ios" src="res/icons/ios/icon.png" width="57" />
        <icon height="114" platform="ios" src="res/icons/ios/icon@2x.png" width="114" />
        <icon height="40" platform="ios" src="res/icons/ios/icon-40.png" width="40" />
        <icon height="80" platform="ios" src="res/icons/ios/icon-40@2x.png" width="80" />
        <icon height="50" platform="ios" src="res/icons/ios/icon-50.png" width="50" />
        <icon height="100" platform="ios" src="res/icons/ios/icon-50@2x.png" width="100" />
        <icon height="60" platform="ios" src="res/icons/ios/icon-60.png" width="60" />
        <icon height="120" platform="ios" src="res/icons/ios/icon-60@2x.png" width="120" />
        <icon height="180" platform="ios" src="res/icons/ios/icon-60@3x.png" width="180" />
        <icon height="72" platform="ios" src="res/icons/ios/icon-72.png" width="72" />
        <icon height="144" platform="ios" src="res/icons/ios/icon-72@2x.png" width="144" />
        <icon height="76" platform="ios" src="res/icons/ios/icon-76.png" width="76" />
        <icon height="152" platform="ios" src="res/icons/ios/icon-76@2x.png" width="152" />
        <icon height="29" platform="ios" src="res/icons/ios/icon-small.png" width="29" />
        <icon height="58" platform="ios" src="res/icons/ios/icon-small@2x.png" width="58" />
        <icon height="87" platform="ios" src="res/icons/ios/icon-small@3x.png" width="87" />
        <icon height="1024" platform="ios" src="res/icons/ios/icon-1024.png" width="1024" />
        <splash height="1136" platform="ios" src="res/screens/ios/Default-568h@2x~iphone.png" width="640" />
        <splash height="1334" platform="ios" src="res/screens/ios/Default-667h.png" width="750" />
        <splash height="2208" platform="ios" src="res/screens/ios/Default-736h.png" width="1242" />
        <splash height="1242" platform="ios" src="res/screens/ios/Default-Landscape-736h.png" width="2208" />
        <splash height="1536" platform="ios" src="res/screens/ios/Default-Landscape@2x~ipad.png" width="2048" />
        <splash height="768" platform="ios" src="res/screens/ios/Default-Landscape~ipad.png" width="1024" />
        <splash height="2048" platform="ios" src="res/screens/ios/Default-Portrait@2x~ipad.png" width="1536" />
        <splash height="1024" platform="ios" src="res/screens/ios/Default-Portrait~ipad.png" width="768" />
        <splash height="960" platform="ios" src="res/screens/ios/Default@2x~iphone.png" width="640" />
        <splash height="480" platform="ios" src="res/screens/ios/Default~iphone.png" width="320" />
        <edit-config target="NSPhotoLibraryUsageDescription" file="*-Info.plist" mode="merge">
            <string>App requires access to photo library in order to enable users to update profile picture with a photo stored in their library. </string>
        </edit-config>
        <custom-config-file parent="NSPhotoLibraryUsageDescription" platform="ios" target="*-Info.plist">
            <string>App requires access to photo library in order to enable users to update profile picture with a photo stored in their library.</string>
        </custom-config-file>
        <icon src="Appstore.png" width="1024" height="1024" />
    </platform>
    <platform name="wp8">
        <icon height="99" platform="wp8" src="www/res/icons/windows/Square150x150Logo.png" width="99" />
        <icon height="159" platform="wp8" src="www/res/icons/winwodws/Square150x150Logo.png" width="159" />
        <splash height="1280" platform="wp8" src="www/res/screens/windows/SplashScreenPhone.scale-240.jpg" width="768" />
    </platform>
    <platform name="windows">
        <icon height="150" platform="windows" src="www/res/icons/windows/Square150x150Logo.png" width="150" />
        <icon height="44" platform="windows" src="www/res/icons/windows/Square44x44Logo.png" width="44" />
        <icon height="50" platform="windows" src="www/res/icons/windows/storelogo.png" width="50" />
        <splash height="300" platform="windows" src="www/res/screens/windows/splashscreen.png" width="620" />
        <icon height="150" platform="windows" src="www/res/icons/windows/Square150x150Logo.png" width="150" />
        <icon height="44" platform="windows" src="www/res/icons/windows/Square44x44Logo.png" width="44" />
        <icon height="106" platform="windows" src="www/res/icons/windows/Square150x150Logo.png" width="106" />
        <icon height="70" platform="windows" src="www/res/icons/windows/Square70x70Logo.png" width="70" />
        <icon height="71" platform="windows" src="www/res/icons/windows/Square71x71Logo.png" width="71" />
        <icon height="170" platform="windows" src="www/res/icons/windows/Square150x150Logo.png" width="170" />
        <icon height="360" platform="windows" src="www/res/icons/windows/Square150x150Logo.png" width="360" />
        <icon height="310" platform="windows" src="www/res/icons/windows/Square150x150Logo.png" width="310" />
        <icon height="150" platform="windows" src="www/res/icons/windows/Square310x310Logo.png" width="310" />
        <icon height="360" platform="windows" src="www/res/icons/windows/Square310x310Logo.png" width="744" />
        <splash height="1920" platform="windows" src="www/res/screens/windows/splashscreen.png" width="1152" />
    </platform>
    <engine name="android" spec="~6.4.0" />
    <engine name="ios" spec="^4.5.3" />
    <plugin name="cordova-plugin-battery-status" spec="^1.2.5" />
    <plugin name="cordova-plugin-camera" spec="^3.0.0">
        <variable name="CAMERA_USAGE_DESCRIPTION" value="Camera used to upload a new profile picture" />
        <variable name="PHOTOLIBRARY_USAGE_DESCRIPTION" value="Library is used to choose and upload a new profile picture" />
    </plugin>
    <plugin name="cordova-plugin-device" spec="^1.1.7" />
    <plugin name="cordova-plugin-device-motion" spec="^1.2.5" />
    <plugin name="cordova-plugin-dialogs" spec="^1.3.4" />
    <plugin name="cordova-plugin-file" spec="^5.0.0" />
    <plugin name="cordova-plugin-file-transfer" spec="^1.7.0" />
    <plugin name="cordova-plugin-globalization" spec="^1.0.8" />
    <plugin name="cordova-plugin-inappbrowser" spec="^1.7.2" />
    <plugin name="cordova-plugin-insomnia" spec="^4.3.0" />
    <plugin name="cordova-plugin-media-capture" spec="^2.0.0">
        <variable name="CAMERA_USAGE_DESCRIPTION" value="Camera used to upload a new profile picture" />
        <variable name="MICROPHONE_USAGE_DESCRIPTION" value="Microphone is not used in this app" />
        <variable name="PHOTOLIBRARY_USAGE_DESCRIPTION" value="Library is used to choose and upload a new profile picture" />
    </plugin>
    <plugin name="cordova-plugin-network-information" spec="^1.3.4" />
    <plugin name="cordova-plugin-screen-orientation" spec="^2.0.2" />
    <plugin name="cordova-plugin-splashscreen" spec="^4.1.0" />
    <plugin name="cordova-plugin-statusbar" spec="^2.3.0" />
    <plugin name="phonegap-plugin-contentsync" spec="^1.4.1" />
    <plugin name="phonegap-plugin-mobile-accessibility" spec="^1.0.5" />
    <plugin name="cordova-plugin-whitelist" spec="^1.3.3" />
    <allow-navigation href="*" />
    <platform name="browser">
        <preference name="SplashScreen" value="www/res/screen/ios/Default-736h.png" />
        <!-- defaults to "/img/logo.png" -->
        <preference name="SplashScreenDelay" value="3000" />
        <!-- defaults to "3000" -->
        <preference name="SplashScreenBackgroundColor" value="white" />
        <!-- defaults to "#464646" -->
        <preference name="ShowSplashScreen" value="false" />
        <!-- defaults to "true" -->
        <preference name="SplashScreenWidth" value="600" />
        <!-- defaults to "170" -->
        <preference name="SplashScreenHeight" value="300" />
        <!-- defaults to "200" -->
    </platform>
    <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>
</widget>

非常感谢您的帮助, 丹尼尔

0 个答案:

没有答案