前段时间适配了iOS11,但是用Xcode9运行真机app,iOS11以下的系统icon都正常,就是iOS11的机器显示的icon空白,打包提审时被拒了。
报错如下
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.
可尝试下面方式解决
1.在Pods中加入
post_install do |installer|
copy_pods_resources_path = "Pods/Target Support Files/Pods-IconTest/Pods-IconTest-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
按照标注两个位置修改即可2.再打开终端,使用cd命令进入项目工程,pod install即可
参考链接
https://github.com/CocoaPods/CocoaPods/issues/7003
网友评论