xcode ionic3 - 无效的 App Store 图标。'YourApp.app' 中资产目录中的 App Store 图标不能是透明的,也不能包含 alpha 通道

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/48459080/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 10:31:39  来源:igfitidea点击:

ionic3 - Invalid App Store Icon. The App Store Icon in the asset catalog in 'YourApp.app' can't be transparent nor contain an alpha channel

iosxcodeionic3

提问by Yuyang He

My ionic3 project build IOS successed, but when I upload it to itunes connect error showing

我的 ionic3 项目构建 IOS 成功,但是当我将其上传到 iTunes 时连接错误显示

enter image description here

在此处输入图片说明

then I try follow this ANSWER, but showing this for me find: convert: No such file or directory

然后我尝试按照这个ANSWER 操作,但是给我看这个find: convert: No such file or directory

EDIT:

编辑:

I installed imagemagickusing npm install imagemagicknot brew install imagemagick

我安装imagemagick使用npm install imagemagickbrew install imagemagick

then running find ./resources/ -name "*.png" -exec convert "{}" -alpha off "{}" \;showing find: convert: No such file or directory.

然后运行find ./resources/ -name "*.png" -exec convert "{}" -alpha off "{}" \;显示find: convert: No such file or directory

回答by Yuyang He

Error solved!! Because of my ionic3 project contains icon alpha channelproblem. And thanks to @Raptor.

错误已解决!!因为我的 ionic3 项目包含图标alpha channel问题。并感谢@Raptor。

  1. I tried to close icon alpha channelby photoshop.
  2. Delete ./resources/ios/iconall icons which in IOSfolder.
  3. Run ionic cordova resources ios.
  4. Rebuild ios ionic cordova build ios --prod, error solved.
  1. 我试图alpha channel通过photoshop关闭图标。
  2. 删除文件夹中的./resources/ios/icon所有图标IOS
  3. 运行ionic cordova resources ios
  4. 重建ios ionic cordova build ios --prod,错误解决。

If still got error or any problem, just comment here and I will try to help you.

如果仍然有错误或任何问题,请在此处发表评论,我会尽力帮助您。

enter image description here

在此处输入图片说明

回答by distante

You need to do this on XCode on your Assets catalog. Like (from Apple) enter image description here

您需要在资产目录上的 XCode 上执行此操作。喜欢(来自苹果) 在此处输入图片说明

At the bottom of that screen you will see the required field:

在该屏幕的底部,您将看到必填字段:

enter image description here

在此处输入图片说明

It should be a 1024x1024 image

它应该是一个 1024x1024 的图像

回答by kloarubeek

If you don't have Photoshop, you can also try it in the free Paint.Net:

如果您没有 Photoshop,也可以在免费的 Paint.Net 中试用:

  • Load the file and save it again but select 24 bits in the options.
  • You will see in the preview that the image will be rendered against a white background.
  • 加载文件并再次保存,但在选项中选择 24 位。
  • 您将在预览中看到图像将在白色背景下呈现。

Thanks Midora from https://forums.getpaint.net/topic/30381-removing-the-alpha-channel/

感谢来自https://forums.getpaint.net/topic/30381-removing-the-alpha-channel/ 的Midora

回答by lotfi Raghib

The find command syntax is not correct, this way you get the message, this how you should use find command :

find 命令语法不正确,通过这种方式您会收到消息,您应该如何使用 find 命令:

  find . -type f \( -iname \*.png \)  -exec convert "{}" -alpha off "{}" \;