美文网首页
iOS 上架到app商店遇到一个问题

iOS 上架到app商店遇到一个问题

作者: 清心清语 | 来源:发表于2017-11-08 14:18 被阅读87次

最近在上架新版本的过程当中,上架的时候遇到过一个报错

报错的内容是:

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

报错后第一反应 去找度娘 然后搜到了很早的解决方案。说是网images.xcassets放入图片,json里图片没有命名,图片的命名方法不对。都试过后还是不好使,后来用看了stackoverflow上说是因为系统是beta版不稳定:地址 2  

地址1

把plist里的BuildMachineOSBuild改成16A323,显示打包内容,在终端里显示那个打包位置,然后在终端输入:

find Products/ -name Info.plist -print0 | xargs -0n1 plutil -replace BuildMachineOSBuild -string 16A323

然后上传后不报错了,但是报了个警报说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里更改上面的那段话,在找到包的内容输入 上面写的

还有一种更暴力的方法。就是使用xocde8.3版本 打包上传

相关文章

网友评论

      本文标题:iOS 上架到app商店遇到一个问题

      本文链接:https://www.haomeiwen.com/subject/byzjlttx.html