应用程序图标不使用cordova更改为自定义图标 [英] App icon not changing to custom icon using cordova

查看:410
本文介绍了应用程序图标不使用cordova更改为自定义图标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用phonegap启动cordova应用程序,但无法更改iOS的默认应用程序图标 - (实际图标不是启动画面)。默认图标始终被复制到Resouces - > icons文件夹而不是我的自定义图标。我已经使用了phonegap中指定的方法,建议在config.xml文件中添加一个icon标签,但这不起作用?重新启动xcode并重新启动我的应用程序,并从模拟器/设备中删除它不起作用。

I am trying to launch a cordova application using phonegap and cannot change the default app icon for iOS - (the actual icons not the splash screen). The default icons are always being copied into the Resouces --> icons folder and not my custom icons. I have used the specified methods from phonegap which suggest adding an icon tag into the config.xml file but this does not work? Restarting xcode and rebooting my app, and deleting it from the simulator/device dont work.

这是我的config.xml文件,我在其中指定图标......

This is my config.xml file where i am specifing the icons...

...
<icon src="icon.png" />
<icon src="icon/ios/icon.png" gap:platform="ios" width="57" height="57" />
<icon src="icon/ios/icon@2x.png" gap:platform="ios" width="114" height="114" />
<icon src="icon/ios/icon-72.png" gap:platform="ios" width="72" height="72"/>
<!-- retina iPad support: PhoneGap 2.5.0+ only -->
<icon src="icon/ios/icon-72@2x.png" gap:platform="ios" width="144" height="144"/>
...

任何帮助都会令人惊叹!

Any help would be amazing!

p.s。我已经明确检查了我可以找到的所有相关帖子,但没有运气

p.s. i have obviously checked all related posts i could find on this and no luck

推荐答案

我遇到了同样的问题,尽管搜索过对于一个确定的我没有运气尝试在config.xml中添加图标标签,既没有将我的图标存储在www / icon文件夹中,所以cordova构建可以复制它们可能是预期的。文档根本不清楚,分散在不同的帖子和解决方案中。

I have faced the same problem, and despite searching for a definitive I had no luck trying to add the icon tags in the config.xml, neither by storing my icons on the www/icon folder so cordova build could copy them as probably expected. The documentation is not clear at all, scattered around different posts and solutions.

那么对我来说有用的是以下内容,尽管我认为这不是最优雅的解决方案,但它工作。

So what works for me is the following, although I think is not the most elegant solution but it works.

打开你的XCode项目并将你的图标存储在资源/图标文件夹上,或者选择你的目标项目,转到摘要并向下滚动直到看到图标,点击在其中任何一个上右键单击它并选择在finder中打开,这样你就可以覆盖默认的位置。

Open your XCode project and store your icons on the folder Resources/icons or alternatively select your target project, go to Summary and scroll down until seeing the icons, click on any of them and right click on it and select open in finder so you have the correct location to override the default ones.

请务必使用相同的名称在目标文件夹中使用,以避免混淆和 CLEAN 您的项目和构建它。

Be sure to use the same names that are used in the target folder to avoid confusion and CLEAN your project and BUILD it again.

很可能如果您在模拟器或设备中运行项目,则会出现默认图标,在这种情况下,只需从设备卸载您的应用程序并再次构建它。

It is likely that if you Run the project in the simulator or device the default icon appear, in that case just uninstall your app from the device and build it again.

希望它有所帮助,但是我希望有一种方法来修改开发人员t www并让 cordova build 复制图标和闪屏。

Hope it helps, however I would expect to have instead a method to modify the development www and let cordova build copy the icons and splashcreen.

这篇关于应用程序图标不使用cordova更改为自定义图标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆