最近在上架新版本的過程當(dāng)中,上架的時(shí)候遇到過一個(gè)報(bào)錯(cuò)
報(bào)錯(cuò)的內(nèi)容是:
iTunes Store Operation Failed
ERROR ITMS-90022: "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."
xcode版本是9.0
報(bào)錯(cuò)后第一反應(yīng) 去找度娘 然后搜到了很早的解決方案。說是網(wǎng)images.xcassets放入圖片,json里圖片沒有命名,圖片的命名方法不對。都試過后還是不好使,后來用看了stackoverflow上說是因?yàn)橄到y(tǒng)是beta版不穩(wěn)定:地址 2??
地址1
把plist里的BuildMachineOSBuild改成16A323,顯示打包內(nèi)容,在終端里顯示那個(gè)打包位置,然后在終端輸入:
find Products/ -name Info.plist -print0 | xargs -0n1 plutil -replace BuildMachineOSBuild -string 16A323
然后上傳后不報(bào)錯(cuò)了,但是報(bào)了個(gè)警報(bào)說1024的問題
找到podfile的地址,在終端輸入
post_install do |installer|
installer.aggregate_targets.each do |target|
copy_pods_resources_path = "Pods/Target Support Files/#{target.name}/#{target.name}-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
注意:把#{target.name}改成Pods加pod里的name
順序是先在pod里更改上面的那段話,在找到包的內(nèi)容輸入 上面寫的
還有一種更暴力的方法。就是使用xocde8.3版本 打包上傳