如果您使用的是Sierra或更新版本
AppIcon.appiconset
文件夹对您的Assets.xcassets
中的所有应用程序图标图像进行复制。
错误信息如下:
"无效的App Store图标。在'YourApp.app'的资源目录中,App Store图标不能是透明的,也不能包含alpha通道。"
所有应用程序图标必须是方形的,不可以有透明或半透明(alpha值!=1.0
)。
提示:应用程序图标可能具有圆角。(在此处分享您的应用程序图标)
这里是苹果公司有关App Icon - 人机界面的指南。
我尝试了这篇文章中提到的几种方法(除了转换为 .jpg 格式),但都没有成功。最终,我通过在 Photoshop 中打开文件并使用“导出为 Web”功能来解决问题。在该过程/窗口中有一个关于透明度的复选框。
for i in `ls *.png`; do convert $i -background white -alpha remove -alpha off $i; done
flutter_icons:
android: "ic_launcher"
image_path_android: "assets/logo_panda.jpg"
ios: true
image_path_ios: "assets/logo_panda.jpg"
我也使用 shell script 运行 ffmpeg 来调整没有 alpha 通道的图片大小。对于 png 格式来说,效果非常好。
# Export ios app icons by ffmpeg scale command
# usage: sh export_ios_icons.sh {path_to_your_img}
# example: sh export_ios_icons.sh ./app_icon.png
# sizes of images
# you can get other size images by editing thisarray
size=(20 40 60 29 58 87 80 120 180 76 152 167 1024)
for i in "${size[@]}"
do
:
ffmpeg -i $1 -vf scale=$i:$i output_$ix$i.png
done
config.xml
中明确列出。一旦我添加了以下这行代码:
<icon height="1024" src="www/res/icon/ios/icon-1024.png" width="1024" />
,
使用Alpha Channel Remover。它可以让你将图标拖入应用程序中,并去除透明度。
从这里下载:http://alphachannelremover.blogspot.com
更新:这不是我的网站