更改PhoneGap应用程序的应用程序切换器/设置图标

时间:2016-09-14 11:21:39

标签: cordova phonegap-build

我使用PhoneGap构建了一个iOS应用程序,PhoneGap Build并将其上传到iTunes Connect with Application Loader。当我在TestFlight中打开它时,无论我对代码或图像做什么,设置中的应用程序图标以及在App切换器上查看它时(双击主页按钮)始终是PhoneGap默认机器人(参见图像)。如果我在www目录中搜索.png,这个图标甚至不存在!我已经无休止地研究了如何配置我的config.xml,但似乎没有任何改变它,并且似乎没有任何确凿的文档可以帮助我。

enter image description here

这是我的配置(省略了敏感信息)所有图标的网址都正确解析:

<?xml version="1.0" encoding="UTF-8"?>

<!-- config.xml reference: https://build.phonegap.com/docs/config-xml -->
<widget xmlns     = "http://www.w3.org/ns/widgets"
        xmlns:gap = "http://phonegap.com/ns/1.0"
        id        = "my_id_here"
        version   = "19">

    <gap:config-file platform="ios" parent="CFBundleShortVersionString">
        <string>1.0.0</string>
    </gap:config-file>

    <name>App name here</name>

    <description>
        App description here
    </description>

    <author href="my_url_here" email="my_email_here">
        Author name here
    </author>

    <!-- Define the main entry-point to the application -->
    <content src="index.html" />

    <!-- Customize your app and platform with the preference element. -->
    <platform name="ios">
        <preference name="orientation"                value="portrait" />       <!-- all: default means both landscape and portrait are enabled -->
        <preference name="target-device"              value="handset" />        <!-- all: possible values handset, tablet, or universal -->
        <preference name="fullscreen"                 value="true" />           <!-- all: hides the status bar at the top of the screen -->
        <preference name="webviewbounce"              value="true" />           <!-- ios: control whether the screen 'bounces' when scrolled beyond the top -->
        <preference name="prerendered-icon"           value="true" />           <!-- ios: if icon is prerendered, iOS will not apply it's gloss to the app's icon on the user's home screen -->
        <preference name="stay-in-webview"            value="false" />          <!-- ios: external links should open in the default browser, 'true' would use the webview the app lives in -->
        <preference name="ios-statusbarstyle"         value="default" />    <!-- ios: black-translucent will appear black because the PhoneGap webview doesn't go beneath the status bar -->
        <preference name="detect-data-types"          value="false" />          <!-- ios: controls whether data types (such as phone no. and dates) are automatically turned into links by the system -->
        <preference name="exit-on-suspend"            value="true" />           <!-- ios: if set to true, app will terminate when home button is pressed -->
        <preference name="show-splash-screen-spinner" value="true" />          <!-- ios: if set to false, the spinner won't appear on the splash screen during app loading -->
        <preference name="auto-hide-splash-screen"    value="true" />           <!-- ios: if set to false, the splash screen must be hidden using a JavaScript API -->
        <preference name="deployment-target"          value="8.0" />
    </platform>

    <!-- Plugins -->
    <!-- Core plugins -->
    <plugin name="cordova-plugin-battery-status"      source="npm" spec="~1.1.1" />
    <plugin name="cordova-plugin-camera"              source="npm" spec="~2.1.1" />
    <plugin name="cordova-plugin-media-capture"       source="npm" spec="~1.2.0" />
    <plugin name="cordova-plugin-console"             source="npm" spec="~1.0.2" />
    <plugin name="cordova-plugin-contacts"            source="npm" spec="~2.0.1" />
    <plugin name="cordova-plugin-device"              source="npm" spec="~1.1.1" />
    <plugin name="cordova-plugin-device-motion"       source="npm" spec="~1.2.0" />
    <plugin name="cordova-plugin-device-orientation"  source="npm" spec="~1.0.2" />
    <plugin name="cordova-plugin-dialogs"             source="npm" spec="~1.2.0" />
    <plugin name="cordova-plugin-file"                source="npm" spec="~4.1.1" />
    <plugin name="cordova-plugin-file-transfer"       source="npm" spec="~1.5.0" />
    <plugin name="cordova-plugin-geolocation"         source="npm" spec="~2.1.0" />
    <plugin name="cordova-plugin-globalization"       source="npm" spec="~1.0.3" />
    <plugin name="cordova-plugin-inappbrowser"        source="npm" spec="~1.3.0" />
    <plugin name="cordova-plugin-media"               source="npm" spec="~2.2.0" />
    <plugin name="cordova-plugin-network-information" source="npm" spec="~1.2.0" />
    <plugin name="cordova-plugin-splashscreen"        source="npm" spec="~3.2.1" />
    <plugin name="cordova-plugin-statusbar"           source="npm" spec="~2.1.2" />
    <plugin name="cordova-plugin-vibration"           source="npm" spec="~2.1.0" />
    <plugin name="cordova-plugin-whitelist"           source="npm" spec="~1.2.1" />
    <plugin name="cordova-plugin-insomnia" />

    <gap:platform name="ios" />

    <!-- Define app icon and splashscreen for each platform. -->
    <icon src="icon.png" gap:platform="ios" width="57" height="57"/>

    <!-- iPhone / iPod Touch  -->
    <icon src="res/icon/ios/icon-60.png" gap:platform="ios" width="60" height="60" />
    <icon src="res/icon/ios/icon-60@2x.png" gap:platform="ios" width="120" height="120" />

    <!-- iPhone 6 / 6+ -->
    <icon src="res/icon/ios/icon-60@3x.png" gap:platform="ios" width="180" height="180" />

    <icon src="res/icon/ios/ipad-76.png" gap:platform="ios" width="76" height="76" />
    <icon src="res/icon/ios/ipad-76@2x.png" gap:platform="ios" width="152" height="152" />

    <!-- app switcher & settings THIS IS WHAT I'VE GLEANED FROM WEB BUT IT DOESN'T WORK -->
    <icon src="res/icon/ios/AppIcon29x29.png" gap:platform="ios" width="29" height="29" />
    <icon src="res/icon/ios/AppIcon29x29@3x.png" gap:platform="ios" width="87" height="87" />

    <!-- iPhone and iPod touch -->
    <gap:splash src="res/screen/ios/Default.png" gap:platform="ios" width="320" height="480" />
    <gap:splash src="res/screen/ios/Default@2x.png" gap:platform="ios" width="640" height="960" />

    <!-- iPhone 5 / iPod Touch (5th Generation) -->
    <gap:splash src="res/screen/ios/Default-568h.png" gap:platform="ios" width="320" height="568" />
    <gap:splash src="res/screen/ios/Default-568h@2x.png" gap:platform="ios" width="640" height="1136" />

    <!-- iPhone 6 -->
    <gap:splash src="res/screen/ios/Default-667h@2x.png" gap:platform="ios" width="750" height="1334" />
    <gap:splash src="res/screen/ios/Default-Portrait-736h@3x.png" gap:platform="ios" width="1242" height="2208" />
    <gap:splash src="res/screen/ios/Default-Landscape-736h@3x.png" gap:platform="ios" width="2208" height="1242" />

    <!--
        Define access to external domains.

        <access />            - a blank access tag denies access to all external resources.
        <access origin="*" /> - a wildcard access tag allows access to all external resource.

        Otherwise, you can specify specific domains:
    -->
    <access origin="*" />
    <!--
       <access origin="http://phonegap.com" />                    - allow any secure requests to http://phonegap.com/
       <access origin="http://phonegap.com" subdomains="true" />  - same as above, but including subdomains, such as http://build.phonegap.com/
       <access origin="http://phonegap.com" browserOnly="true" /> - only allows http://phonegap.com to be opened by the child browser.
    -->

    <!-- Added the following intents to support the removal of whitelist code from base cordova to a plugin -->
    <!-- Whitelist configuration. Refer to https://cordova.apache.org/docs/en/edge/guide_appdev_whitelist_index.md.html -->

    <allow-intent href="http://*/*" />
    <allow-intent href="https://*/*" />
    <allow-intent href="tel:*" />
    <allow-intent href="sms:*" />
    <allow-intent href="mailto:*" />
    <allow-intent href="geo:*" />

</widget>

我发现这篇文章表明它可能是一个PhoneGap构建问题,但底部的链接现在已经死了! enter link description here

1 个答案:

答案 0 :(得分:0)