在Sencha Touch + phonegap中设置iOS应用程序图标?

时间:2015-04-06 18:43:56

标签: ios cordova sencha-touch sencha-touch-2 sencha-cmd

我已经看到很多不同的方法,但似乎没有一个对我有用。使用cmd 4为vanilla touch 2.3.1 + phonegap项目设置iOS应用程序图标的简单方法是什么?我有/ resources / icons中的所有文件,并在/config.xml中设置了相应的路径,如下所示:

 <icon gap:platform="ios" height="57" src="resources/icons/Icon.png" width="57" />
<icon gap:platform="ios" height="72" src="resources/icons/Icon-72.png" width="72" />
<icon gap:platform="ios" height="114" src="resources/icons/Icon@2x.png" width="114" />
<icon gap:platform="ios" height="144" src="resources/icons/Icon-72@2x.png" width="144" />

但即使是&#34; www / resources&#34;,&#34; ../ resources&#34;的变体也没有骰子。是否有某种缓存需要清除?飞溅和加载图标怎么样?这似乎是文档中的漏洞。

谢谢!

2 个答案:

答案 0 :(得分:0)

我猜你的尺码错了。尝试其中之一:

<platform name="ios">
    <!-- iOS 7.0+ -->
    <!-- iPhone / iPod Touch  -->
    <icon src="res/icon/ios/icon-60.png" width="60" height="60" />
    <icon src="res/icon/ios/icon-60@2x.png" width="120" height="120" />
    <!-- iPad -->
    <icon src="res/icon/ios/icon-76.png" width="76" height="76" />
    <icon src="res/icon/ios/icon-76@2x.png" width="152" height="152" />
    <!-- iOS 6.1 -->
    <!-- Spotlight Icon -->
    <icon src="res/icon/ios/icon-40.png" width="40" height="40" />
    <icon src="res/icon/ios/icon-40@2x.png" width="80" height="80" />
    <!-- iPhone / iPod Touch -->
    <icon src="res/icon/ios/icon.png" width="57" height="57" />
    <icon src="res/icon/ios/icon@2x.png" width="114" height="114" />
    <!-- iPad -->
    <icon src="res/icon/ios/icon-72.png" width="72" height="72" />
    <icon src="res/icon/ios/icon-72@2x.png" width="144" height="144" />
    <!-- iPhone Spotlight and Settings Icon -->
    <icon src="res/icon/ios/icon-small.png" width="29" height="29" />
    <icon src="res/icon/ios/icon-small@2x.png" width="58" height="58" />
    <!-- iPad Spotlight and Settings Icon -->
    <icon src="res/icon/ios/icon-50.png" width="50" height="50" />
    <icon src="res/icon/ios/icon-50@2x.png" width="100" height="100" />
  </platform>



<!-- 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" />

  <!-- 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" />

  <!-- 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" />

  <!-- iOS 6.1 -->
  <!-- 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" />

答案 1 :(得分:0)

我列出了所有必需的分辨率,图标名称和启动画面名称。 enter image description here

命名所有PNG文件后,您需要将其放入图标和splash文件夹中,您可以在/ ExampleApp / Platform / ios / ExampleApp / Resources文件夹中找到它。

有关您的问题的详细信息,请阅读并遵循this