如何正确更新旧 Swift 项目中的 Assets.xcassets 添加新的支持并部署 iOS 15.0+ 设备?

How to correctly update the Assets.xcassets in old Swift Project with new support added and Deployment for iOS 15.0+ devices?

最近,在Swift开发的一个老项目需要新的图标来实现并在飞行测试中启动它,但它不支持iOS 15.0 + AppIcon。

我尝试并发布的内容:

  1. 已转换图像并在 AppIcon 中导入图像,但未显示链接

也尝试将所有 png 文件单独添加到 info.plist 中的 iconImages

  1. 使用图标生成器将原始图像转换为以下图像所需的条件::
  2. 尝试了 的修复,但在抑制其他错误的同时给出了以下错误。

An app icon measuring 1024 by 1024 pixels in PNG format for Asset Catalog of apps built for iOS, iPadOS, or watchOS

an app icon for iPad of exactly '152x152' pixels, in .png format for iOS versions >= 10.0. To support older operating systems, the icon may be required in the bundle outside of an asset catalog

an app icon for iPad of exactly '167x167' pixels, in .png format for iOS versions supporting iPad Pro

an app icon for iPhone / iPod Touch of exactly '120x120' pixels, in .png format for iOS versions >= 10.0

目前我的 AppIcon 中有以下内容 ::

工作(简单)解决方案:

  • 创建新项目
  • 将所有文件(AppIcons 除外)迁移到新项目
  • 下载旧 pod 文件
  • 中提到的所有 pods
  • 将所有分辨率 AppIcon 文件从旧项目复制到新项目
  • 清理构建
  • 运行 项目

其他解决方案:

  • 正在将 Assets 文件夹从任何其他项目复制到该项目并复制粘贴所需的 AppIcon 文件