我創建了一個簡單易用的工具,允許您將PNG圖像轉換爲Phonegap的iOS和Android APP圖標。
它涵蓋了所有不同的尺寸,所有你需要做的就是上傳一個1204x1204像素的PNG文件,並在幾秒鐘內獲得你的圖標。
這是鏈接到該工具:
https://vps267717.ovh.net/phonegap-assets/
至於你的問題,你需要使用下面的代碼在你的config.xml中:
<!-- iPhone and iPod touch -->
<splash src="Default.png" gap:platform="ios" width="320" height="480" />
<splash src="[email protected]" gap:platform="ios" width="640" height="960" />
<!-- iPhone 5/iPod Touch (5th Generation) -->
<splash src="[email protected]" gap:platform="ios" width="640" height="1136" />
<!-- iPhone 6 -->
<splash src="[email protected]" gap:platform="ios" width="750" height="1334" />
<splash src="[email protected]" gap:platform="ios" width="1242" height="2208" />
<!-- iPad -->
<splash src="Default-Portrait.png" gap:platform="ios" width="768" height="1024" />
<splash src="Default-Landscape.png" gap:platform="ios" width="1024" height="768" />
<!-- Retina iPad -->
<splash src="[email protected]" gap:platform="ios" width="1536" height="2048" />
<gap:plugin name="cordova-plugin-network-information" source="npm" />
<gap:plugin name="cordova-plugin-inappbrowser" source="npm" />
<icon src="icon.png" gap:role="default" />
<icon src="icons/ios/icon.png" />
<!-- iPhone 6/6+ -->
<icon src="icons/ios/[email protected]" gap:platform="ios" width="180" height="180" />
<!-- iPhone/iPod Touch -->
<icon src="icons/ios/icon-60.png" gap:platform="ios" width="60" height="60" />
<icon src="icons/ios/[email protected]" gap:platform="ios" width="120" height="120" />
<!-- iPad -->
<icon src="icons/ios/icon-76.png" gap:platform="ios" width="76" height="76" />
<icon src="icons/ios/[email protected]" gap:platform="ios" width="152" height="152" />
<!-- Settings Icon -->
<icon src="icons/ios/icon-small.png" gap:platform="ios" width="29" height="29" />
<icon src="icons/ios/[email protected]" gap:platform="ios" width="58" height="58" />
<!-- Spotlight Icon -->
<icon src="icons/ios/icon-40.png" gap:platform="ios" width="40" height="40" />
<icon src="icons/ios/[email protected]" gap:platform="ios" width="80" height="80" />
<icon src="icons/ios/[email protected]" gap:platform="ios" width="120" height="120" />
<!-- iPhone/iPod Touch -->
<icon src="icons/ios/icon.png" gap:platform="ios" width="57" height="57" />
<icon src="icons/ios/[email protected]" gap:platform="ios" width="114" height="114" />
<!-- iPad -->
<icon src="icons/ios/icon-72.png" gap:platform="ios" width="72" height="72" />
<icon src="icons/ios/[email protected]" gap:platform="ios" width="144" height="144" />
<!-- iPhone Spotlight and Settings Icon -->
<icon src="icons/ios/icon-small.png" gap:platform="ios" width="29" height="29" />
<icon src="icons/ios/[email protected]" gap:platform="ios" width="58" height="58" />
<!-- iPad Spotlight and Settings Icon -->
<icon src="icons/ios/icon-50.png" gap:platform="ios" width="50" height="50" />
<icon src="icons/ios/[email protected]" gap:platform="ios" width="100" height="100" />
<!-- iPhone/iPod Touch -->
<icon src="icons/ios/icon.png" gap:platform="ios" width="57" height="57" />
<icon src="icons/ios/[email protected]" gap:platform="ios" width="114" height="114" />
<!-- iPhone Spotlight and Settings Icon -->
<icon src="icons/ios/icon-small.png" gap:platform="ios" width="29" height="29" />
<icon src="icons/ios/[email protected]" gap:platform="ios" width="58" height="58" />
<!-- Android Icon -->
<icon src="icons/android/icon.png" gap:platform="android" gap:role="default" />
<icon src="icons/android/ldpi.png" gap:platform="android" gap:qualifier="ldpi" />
<icon src="icons/android/mdpi.png" gap:platform="android" qualifier="mdpi" />
<icon src="icons/android/hdpi.png" gap:platform="android" qualifier="hdpi" />
<icon src="icons/android/xhdpi.png" gap:platform="android" qualifier="xhdpi" />
<icon src="icons/android/xxhdpi.png" gap:platform="android" qualifier="xxhdpi" />
<icon src="icons/android/xxxhdpi.png" gap:platform="android" qualifier="xxxhdpi" />
確保圖標的路徑反映到您的圖標,一切都應該工作得很好。
我已經通過稍微編輯該工具,因爲我被告知它正在錯誤地創建一個Android圖標。它應該可以正常工作。如果我的回答已回答您的問題,請接受它。謝謝 –