前段時(shí)間適配了iOS11赏半,但是用Xcode9運(yùn)行真機(jī)app未辆,iOS11以下的系統(tǒng)icon都正常燃辖,就是iOS11的機(jī)器顯示的icon空白,打包提審時(shí)被拒了踏烙。
報(bào)錯(cuò)如下
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命令進(jìn)入項(xiàng)目工程,pod install即可
參考鏈接
https://github.com/CocoaPods/CocoaPods/issues/7003