简体   繁体   English

如何为我的iPhone应用程序更新应用程序图标?

[英]how to update app icon for my iPhone app?

We have an updated version of our app icon to replace the existing one, we tried to simply overwrite the old one (image file) with the new version (image file), build and then deploy, what we found on the device is still the old icon being used for our app. 我们已更新了应用程序图标的版本,以替换现有的图标,我们尝试用新版本(图像文件)简单地覆盖旧的(图像文件),构建然后部署,我们在设备上发现的仍然是用于我们应用的旧图标。 Is this a normal behavior, what's the "official" steps for such needs? 这是正常现象吗,满足这些需求的“正式”步骤是什么? Note that we are still in development stage, which is why we need to update our app icons based on the new art work done by our designers. 请注意,我们仍处于开发阶段,这就是为什么我们需要根据设计师所做的新艺术作品来更新应用程序图标的原因。

Even i faced the same issue ,& its just because the app still has the reference to the old icon file or may be it has not been deleted from the resources, you may have opted for reference only while deleting the app icon. 即使我遇到了同样的问题,也仅仅是因为该应用程序仍具有对旧图标文件的引用,或者可能是它尚未从资源中删除,您可能仅在删除该应用程序图标时选择了引用。

It's simple , 这很简单 ,

For easy followup I have attached the Screenshots too : ;) 为了便于后续操作,我也附上了屏幕截图:;)

1) Delete your application icon.png from the app, selecting an option " Also Move to Trash " . 1)从应用程序中删除应用程序icon.png,选择一个选项“ 同时移至废纸 “”。

在此处输入图片说明

2) Now Clean build & all the targets . 2)现在清理构建所有目标

在此处输入图片说明

3) Reveal in finder the resource folder in your app & first copy your New App icon over there. 3) 在finder中显示应用程序中的资源文件夹,然后首先 该文件夹中复制“ New App”图标

在此处输入图片说明

4) Now, drag & drop the new application icon from application finder to your Resource folder , make sure to check the option to copy items . 4)现在,将新的应用程序图标从应用程序查找器拖放到资源文件夹中 ,确保选中复制项目的选项

在此处输入图片说明

5) Also, prior to submitting the application to AppStore, make sure to do changes in your .plist file .Add value icon.png value to Icon file key. 5)此外,在将应用程序提交到AppStore之前,请确保对.plist文件进行更改。将value icon.png值添加到Icon文件密钥中。

在此处输入图片说明

Once, you are done with all the steps, just reset your Simulator & Run the app. 一旦完成所有步骤,只需重置模拟器并运行该应用程序即可。 I am sure that would solve your problem. 我相信这可以解决您的问题。

执行cmd + k(清理),然后执行cmd + r(运行)

First of all delete the icon.png then select the image you want to create the icon select and drag it and put the following place and clean up your project(Cmd + shift + k). 首先删除icon.png文件,然后选择要创建的图像,然后将其拖到下面的位置并清理您的项目(Cmd + shift + k)。

在此处输入图片说明

Now the run the project and it change the icon of the application. 现在运行项目,它会更改应用程序的图标。

i think it's helpful for you 我认为这对您有帮助

Reference Apple Technical docs , about Troubleshooting section. 有关故障排除部分,请参考Apple技术文档 That technical document gives details about this icon issue. 该技术文档提供了有关此图标问题的详细信息。

The following is what I encounter. 以下是我遇到的。

Error: Invalid Image Path 错误:无效的图像路径

Your application's information property list references one or more icon images that were not included in the compiled bundle. 应用程序的信息属性列表引用了一个或多个未包含在已编译捆绑包中的图标图像。

If your application is using asset catalogs to manage its icons then the information property list should not include any icon related keys; 如果您的应用程序使用资产目录来管理其图标,则信息属性列表不应包含任何与图标相关的键; they will be added at build time by the asset catalog compiler. 它们将在构建时由资产目录编译器添加。

Open the information property list for your app's target. 打开应用程序目标的信息属性列表。 It can be found under the Info tab in the project editor or in the File Navigator where it will be named either -Info.plist or Info.plist, where is the name of your app. 可以在项目编辑器的“信息”选项卡下或“文件浏览器”中找到该文件,该文件将被命名为-Info.plist或Info.plist,这是应用程序的名称。

Remove the following keys, including device specific variations. 删除以下键,包括设备特定的版本。

  1. “Icon file” (CFBundleIconFile) “图标文件”(CFBundleIconFile)
  2. “Icon files” (CFBundleIconFiles) “图标文件”(CFBundleIconFiles)
  3. CFBundleIcons CFBundleIcons

My project use App Icons Source to manage app icons, but the Info.plist also contains Icon files , and images in the resources. 我的项目使用App Icons Source来管理应用程序图标,但是Info.plist也包含Icon files和资源中的图像。


More ... 更多 ...

If you encounter following case, reference that apple docs , it will help you. 如果遇到以下情况,请参考该Apple文档 ,它将为您提供帮助。

The wrong icon appears in the App Store Your application bundle includes additional images which are being detected as valid icon images. 错误的图标出现在App Store中您的应用程序捆绑包包含其他图像,这些图像被检测为有效图标图像。

Clean build folder first before you redeploy, Xcode cache some of the data. 在重新部署之前,请先清理build文件夹,Xcode会缓存一些数据。 To clean build folder, Go to Products, and hold option, there will be an option to. 要清理构建文件夹,请转到“产品并按住”选项,然后会有一个选项。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM