PhoneGap config.xml iOS 应用图标问题

PhoneGap config.xml iOS app icon issues

PhoneGap 文档说我可以通过 config.xml 进行设置(三个月前确实如此)。我没有 Apple 机器,所以我无法通过 Xcode 设置图标...所以请避免将我引导到需要 Apple osx 命令行的答案并分享 config.xml 解决方案,如果你知道的 - 谢谢

我在 build.phonegap.com

上构建我的应用程序

三个月前构建的应用程序图标在 Android 和 Apple 上都很好。

我有一个平面目录结构。我的 index.html(我的主要 jquery 移动应用程序代码)、config.xml 和 icon.png 在同一目录中。

谁能告诉我哪里出错了?我的config.xml如下图供参考...(感谢)

<!-- 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        = "com.myapp.app16"
        version   = "16.5.11">
    <preference name="permissions"                value="none"/>
    <!-- name, descriptiona and author tags omitted from here on purpose -->
    <preference name="orientation"                value="default" />        <!-- all: default means both landscape and portrait are enabled -->
    <preference name="target-device"              value="universal" />      <!-- 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="black-opaque" />   <!-- ios: black-translucent will appear black because the PhoneGap webview doesn't go beneath the status bar -->
    <preference name="detect-data-types"          value="true" />           <!-- 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="false" />          <!-- 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="disable-cursor"             value="false" />          <!-- blackberry: prevents a mouse-icon/cursor from being displayed on the app -->
    <preference name="android-installLocation"    value="internalOnly" />           <!-- android: app install location. 'auto' will choose. 'internalOnly' is device memory. 'preferExternal' is SDCard. -->
    <preference name="StatusBarOverlaysWebView" value="false" />
  <preference name="FadeSplashScreen" value="false"/>
<plugin name="cordova-plugin-whitelist" spec="1.2.2" />
<plugin name="org.apache.cordova.device-orientation" spec="1.0.3" />
<plugin name="org.apache.cordova.geolocation" spec="2.2.0" />
<plugin name="org.apache.cordova.network-information" spec="1.2.1" />
<plugin name="org.apache.cordova.splashscreen" spec="3.2.2" />
<plugin name="org.apache.cordova.statusbar" spec="2.1.3" />

    <gap:config-file platform="ios" parent="CFBundleShortVersionString">
        <string>100</string>
    </gap:config-file>
  <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:*" />
        <icon src="icon.png" />
    </platform>

    <platform name="ios">
        <allow-intent href="itms:*" />
        <allow-intent href="itms-apps:*" />
        <icon src="icon.png" /> <!-- Default icon -->
    </platform>

</widget>

我相信您实际上需要添加苹果为每个设备使用的每个不同的图标大小。

这是我的实际 config.xml,其中有 android 和 ios 的图标。 请注意,我的文件夹图标位于:res/icon/iosres/icon/android

<!-- iOS 8.0+ -->
<!-- iPhone 6 Plus  -->
<!-- <icon src="res/icon/ios/icon-60@3x.png" width="180" height="180" /> -->
<!-- iOS 7.0+ -->
<!-- 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" />
<!-- iPad -->
<icon src="res/icon/ios/Icon-76.png" gap:platform="ios" width="76" height="76" />
<icon src="res/icon/ios/Icon-76@2x.png" gap:platform="ios" width="152" height="152" />
<!-- iOS 6.1 -->
<!-- Spotlight Icon -->
<icon src="res/icon/ios/Icon-40.png" gap:platform="ios" width="40" height="40" />
<icon src="res/icon/ios/Icon-40@2x.png" gap:platform="ios" width="80" height="80" />
<!-- iPhone / iPod Touch -->
<icon src="res/icon/ios/Icon.png" gap:platform="ios" width="57" height="57" />
<icon src="res/icon/ios/Icon@2x.png" gap:platform="ios" width="114" height="114" />
<!-- iPad -->
<icon src="res/icon/ios/Icon-72.png" gap:platform="ios" width="72" height="72" />
<icon src="res/icon/ios/Icon-72@2x.png" gap:platform="ios" width="144" height="144" />
<!-- iPhone Spotlight and Settings Icon -->
<icon src="res/icon/ios/Icon-Small.png" gap:platform="ios" width="29" height="29" />
<icon src="res/icon/ios/Icon-Small@2x.png" gap:platform="ios" width="58" height="58" />
<!-- iPad Spotlight and Settings Icon -->
<icon src="res/icon/ios/Icon-50.png" gap:platform="ios" width="50" height="50" />
<icon src="res/icon/ios/Icon-50@2x.png" gap:platform="ios" width="100" height="100" />

<!-- Android Icons -->

<icon src="res/icon/android/ldpi.png" gap:platform="android" gap:qualifier="ldpi" />
<icon src="res/icon/android/mdpi.png" gap:platform="android" gap:qualifier="mdpi" />
<icon src="res/icon/android/hdpi.png" gap:platform="android" gap:qualifier="hdpi" />
<icon src="res/icon/android/xhdpi.png" gap:platform="android" gap:qualifier="xhdpi" />