上海专业网站推广公司,网站实名审核,网站外链快速建设,微信公众号的管理Xcode: 14.3.1 更改 App 图标 
淘宝#xff0c;支付宝#xff0c;有道翻译有时候会随着运营活动去调整图标#xff0c;比如 双 11。#xff08;这个很简单#xff0c;替换一下 AppIcon 就可以了#xff09;Github App 提供了多套图标可以修改。#xff08;需要配置 支付宝有道翻译有时候会随着运营活动去调整图标比如 双 11。这个很简单替换一下 AppIcon 就可以了Github App 提供了多套图标可以修改。需要配置  写代码这篇博客主要来搞这个。 第一种方式现在 2023 年准备一张 1024 * 1024 的图片就可以了之前需要十几种各种尺寸的吐血。 
第二种方法就需要一些繁琐的步骤了 1. 新建一些 AppIcon1 AppIcon2 AppIcon3… 备选用 2. Build Settings - 过滤 App Icon 
3. 将 Include All App Icon Assets No 改为 Yes 
4. 将 AppIcon1 AppIcon2 AppIcon3… 添加到 Alternate App Icon Sets 5. Next show me the code… AppStorage(setting_active_app_icon) var setting_active_app_icon  Picker(selection: $setting_active_app_icon) {Text(红色).tag(AppIcon1)Text(橙色).tag(AppIcon2)Text(黄色).tag(AppIcon3)Text(绿色).tag(AppIcon4)Text(蓝色 - 默认).tag(AppIcon5)
} label: {Text(更改图标)
}
.onChange(of: setting_active_app_icon) { newValue inprint(更改图标 Picker onChange, newValue, type(of: newValue))UIApplication.shared.setAlternateIconName(newValue) { (error) inif let error  error {print(Failed request to update the app’s icon: \(error))}}
}Preview 喜欢或对你有帮助请点个赞吧自己先点个嘿嘿 。 
有错误或者疑问还请评论指出。 
我的个人网站 点击访问 hongweizhu.com 。 END