缺少必需的图标文件。捆绑包不包含

时间:2022-10-06 16:54:17

This is the error message:

这是错误消息:

ITunes Store operation failed. Missing required icon file. The bundle does not contain an app icon for iPhone / iPod Touch of exactly "120x120" pixels, in .png format for iOS versions >= 7.0.

ITunes Store操作失败。缺少必需的图标文件。该软件包不包含完全“120x120”像素的iPhone / iPod Touch应用程序图标,iOS版本的.png格式> = 7.0。

I have this problem while submitting my app to the app store, I face this problem while validating my project and I tried all the answers here in * but the error is same .

我在将应用程序提交到应用程序商店时遇到此问题,我在验证项目时遇到了这个问题,我在*中尝试了所有答案,但错误是相同的。

5 个解决方案

#1


12  

Open your project's General Preferences in Xcode, and make sure that your App Icons Source is the Asset Catalog named "AppIcon":

在Xcode中打开项目的常规首选项,并确保您的应用程序图标源是名为“AppIcon”的资产目录:

缺少必需的图标文件。捆绑包不包含

Then, in the project navigator, click Images.xcassets, click AppIcon, and then drag and drop your icons into the required places. If AppIcon is not shown, you'll have to right click and choose "New App Icon" and then select the proper icons from the inspector on the right:

然后,在项目导航器中,单击Images.xcassets,单击AppIcon,然后将图标拖放到所需的位置。如果未显示AppIcon,则必须右键单击并选择“新建应用程序图标”,然后从右侧的检查器中选择正确的图标:

缺少必需的图标文件。捆绑包不包含

Once you've done this, your icons should show up where they're supposed to.

完成此操作后,您的图标应显示在他们应该的位置。

#2


0  

Right click on AppIcon xcassets, then you can see new app Icon.

右键单击AppIcon xcassets,然后您就可以看到新的应用程序图标。

It will show you New App Icon, then it will show you all required icon, and you need to fill everything needed there and remove current one.

它将显示New App Icon,然后它将显示所有必需的图标,您需要填写所需的所有内容并删除当前的图标。

#3


0  

Please change your development target 6.0 to 7.0 in your xcode and start new archive its working successfully.

请在xcode中将开发目标6.0更改为7.0,并开始新的存档,使其成功运行。

#4


0  

Just had same problem and post answer in case someone like me, stumbles over here. Using Xcode 8.3.3 and wanted to use AppIcon in Assets catalogue. Tried all sorts of Stack Overflow answers without success.

只是遇到了同样的问题并且发布了答案,以防有人像我一样,在这里绊倒。使用Xcode 8.3.3并希望在Assets目录中使用AppIcon。尝试了各种Stack Overflow答案但没有成功。

Finally learned about a deep clean step from Ken/Apple Forum:

终于从Ken / Apple论坛了解到了一个深刻的清洁步骤:

  • removed all icon files, whether from resources (delete - trash) or appicon file (select - remove selected items); removed even assets folder
  • 删除所有图标文件,无论是来自资源(删除 - 垃圾桶)还是appicon文件(选择 - 删除所选项目);删除甚至资产文件夹
  • deep cleaned (Use the Product menu w/option key pressed, then choose to 'clean build folder')
  • 深度清洁(按产品菜单w /选项键,然后选择'清理构建文件夹')
  • added a new asset catalogue and called it "Assets" right clicked in Assets folder and added new app icon set - changed that one in inspector to be for iOS >=7
  • 添加了一个新的资产目录,并将其称为“资产”,右键单击Assets文件夹并添加了新的应用程序图标集 - 在检查器中将其更改为iOS> = 7
  • triple checked all my icon files OUTSIDE of Xcode (all were already png files of right resolution, but some had still colour profile attached from photoshop elements or did have indexed colour instead of RGB profile. so I made sure I only save a png file without colour profile and from a background layer) - not sure that was necessary
  • 三重检查我的所有图标文件在Xcode外面(所有已经是正确分辨率的png文件,但有些仍然从photoshop元素附加颜色配置文件或者有索引颜色而不是RGB配置文件。所以我确保我只保存一个png文件没有颜色配置文件和背景图层) - 不确定是否有必要
  • archived the build from Product menu
  • 从“产品”菜单中归档构建
  • validated and uploaded the build from Window - Organizer
  • 验证并从Window - Organizer上传了构建版本

#5


0  

I was facing this error while uploading app to AppStore

将应用程序上传到AppStore时,我遇到了这个错误

Missing required icon file - The bundle does not contain an app icon for iPad of exactly ‘76x76’ pixels, in .png format for iOS versions >= 7.0.

缺少必需的图标文件 - 该软件包不包含iPad的应用程序图标,其大小为'76x76'像素,iOS版本的.png格式> = 7.0。

Missing required icon file - The bundle does not contain an app icon for iPad of exactly ‘152x152’ pixels, in .png format for iOS versions = 7.0.

缺少必需的图标文件 - 该捆绑包不包含iPad的“152x152”像素的应用程序图标,iOS版本的.png格式= 7.0。

I solved it by adding this script at the end of Podfile

我通过在Podfile的末尾添加此脚本来解决它

post_install do |installer|
    copy_pods_resources_path = "Pods/Target Support Files/Pods-TargetName/Pods-TargetName-resources.sh"
    string_to_replace = '--compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"'
    assets_compile_with_app_icon_arguments = '--compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" --app-icon "${ASSETCATALOG_COMPILER_APPICON_NAME}" --output-partial-info-plist "${BUILD_DIR}/assetcatalog_generated_info.plist"'
    text = File.read(copy_pods_resources_path)
    new_contents = text.gsub(string_to_replace, assets_compile_with_app_icon_arguments)
    File.open(copy_pods_resources_path, "w") {|file| file.puts new_contents }
end

Install your Podfile again, may it should help.

再次安装你的Podfile,它可能会有所帮助。

P.S. Remember TargetName in above script should be your Projects' Target Name. e.g. if your target name is MyAppName then you should replace TargetName in above script as MyAppName

附:请记住上面脚本中的TargetName应该是您的Projects的目标名称。例如如果您的目标名称是MyAppName,那么您应该将上面脚本中的TargetName替换为MyAppName

#1


12  

Open your project's General Preferences in Xcode, and make sure that your App Icons Source is the Asset Catalog named "AppIcon":

在Xcode中打开项目的常规首选项,并确保您的应用程序图标源是名为“AppIcon”的资产目录:

缺少必需的图标文件。捆绑包不包含

Then, in the project navigator, click Images.xcassets, click AppIcon, and then drag and drop your icons into the required places. If AppIcon is not shown, you'll have to right click and choose "New App Icon" and then select the proper icons from the inspector on the right:

然后,在项目导航器中,单击Images.xcassets,单击AppIcon,然后将图标拖放到所需的位置。如果未显示AppIcon,则必须右键单击并选择“新建应用程序图标”,然后从右侧的检查器中选择正确的图标:

缺少必需的图标文件。捆绑包不包含

Once you've done this, your icons should show up where they're supposed to.

完成此操作后,您的图标应显示在他们应该的位置。

#2


0  

Right click on AppIcon xcassets, then you can see new app Icon.

右键单击AppIcon xcassets,然后您就可以看到新的应用程序图标。

It will show you New App Icon, then it will show you all required icon, and you need to fill everything needed there and remove current one.

它将显示New App Icon,然后它将显示所有必需的图标,您需要填写所需的所有内容并删除当前的图标。

#3


0  

Please change your development target 6.0 to 7.0 in your xcode and start new archive its working successfully.

请在xcode中将开发目标6.0更改为7.0,并开始新的存档,使其成功运行。

#4


0  

Just had same problem and post answer in case someone like me, stumbles over here. Using Xcode 8.3.3 and wanted to use AppIcon in Assets catalogue. Tried all sorts of Stack Overflow answers without success.

只是遇到了同样的问题并且发布了答案,以防有人像我一样,在这里绊倒。使用Xcode 8.3.3并希望在Assets目录中使用AppIcon。尝试了各种Stack Overflow答案但没有成功。

Finally learned about a deep clean step from Ken/Apple Forum:

终于从Ken / Apple论坛了解到了一个深刻的清洁步骤:

  • removed all icon files, whether from resources (delete - trash) or appicon file (select - remove selected items); removed even assets folder
  • 删除所有图标文件,无论是来自资源(删除 - 垃圾桶)还是appicon文件(选择 - 删除所选项目);删除甚至资产文件夹
  • deep cleaned (Use the Product menu w/option key pressed, then choose to 'clean build folder')
  • 深度清洁(按产品菜单w /选项键,然后选择'清理构建文件夹')
  • added a new asset catalogue and called it "Assets" right clicked in Assets folder and added new app icon set - changed that one in inspector to be for iOS >=7
  • 添加了一个新的资产目录,并将其称为“资产”,右键单击Assets文件夹并添加了新的应用程序图标集 - 在检查器中将其更改为iOS> = 7
  • triple checked all my icon files OUTSIDE of Xcode (all were already png files of right resolution, but some had still colour profile attached from photoshop elements or did have indexed colour instead of RGB profile. so I made sure I only save a png file without colour profile and from a background layer) - not sure that was necessary
  • 三重检查我的所有图标文件在Xcode外面(所有已经是正确分辨率的png文件,但有些仍然从photoshop元素附加颜色配置文件或者有索引颜色而不是RGB配置文件。所以我确保我只保存一个png文件没有颜色配置文件和背景图层) - 不确定是否有必要
  • archived the build from Product menu
  • 从“产品”菜单中归档构建
  • validated and uploaded the build from Window - Organizer
  • 验证并从Window - Organizer上传了构建版本

#5


0  

I was facing this error while uploading app to AppStore

将应用程序上传到AppStore时,我遇到了这个错误

Missing required icon file - The bundle does not contain an app icon for iPad of exactly ‘76x76’ pixels, in .png format for iOS versions >= 7.0.

缺少必需的图标文件 - 该软件包不包含iPad的应用程序图标,其大小为'76x76'像素,iOS版本的.png格式> = 7.0。

Missing required icon file - The bundle does not contain an app icon for iPad of exactly ‘152x152’ pixels, in .png format for iOS versions = 7.0.

缺少必需的图标文件 - 该捆绑包不包含iPad的“152x152”像素的应用程序图标,iOS版本的.png格式= 7.0。

I solved it by adding this script at the end of Podfile

我通过在Podfile的末尾添加此脚本来解决它

post_install do |installer|
    copy_pods_resources_path = "Pods/Target Support Files/Pods-TargetName/Pods-TargetName-resources.sh"
    string_to_replace = '--compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"'
    assets_compile_with_app_icon_arguments = '--compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" --app-icon "${ASSETCATALOG_COMPILER_APPICON_NAME}" --output-partial-info-plist "${BUILD_DIR}/assetcatalog_generated_info.plist"'
    text = File.read(copy_pods_resources_path)
    new_contents = text.gsub(string_to_replace, assets_compile_with_app_icon_arguments)
    File.open(copy_pods_resources_path, "w") {|file| file.puts new_contents }
end

Install your Podfile again, may it should help.

再次安装你的Podfile,它可能会有所帮助。

P.S. Remember TargetName in above script should be your Projects' Target Name. e.g. if your target name is MyAppName then you should replace TargetName in above script as MyAppName

附:请记住上面脚本中的TargetName应该是您的Projects的目标名称。例如如果您的目标名称是MyAppName,那么您应该将上面脚本中的TargetName替换为MyAppName