XCode9打包上传遇到的问题和解决方式
原文地址:http://blog.csdn.net/yohunl/article/details/78065656
昨天升级的XCode9正式版,今天打包后,提交App Store的时候遇到了如下的错误
iTunes Store Operation Failed description length:6193045 iTunes Store Operation Failed ERROR ITMS-90022: "Missing required icon file. The bundle doesnotcontain an app iconforiPhone / iPod Touchofexactly '120x120' pixels,in.png formatforiOS versions >= 7.0." iTunes Store Operation Failed ERROR ITMS-90023: "Missing required icon file. The bundle doesnotcontain an app iconforiPadofexactly '76x76' pixels,in.png formatforiOS versions >= 7.0." iTunes Store Operation Failed ERROR ITMS-90023: "Missing required icon file. The bundle doesnotcontain an app iconforiPadofexactly '167x167' pixels,in.png formatforiOS versions supporting iPad Pro." iTunes Store Operation Failed ERROR ITMS-90023: "Missing required icon file. The bundle doesnotcontain an app iconforiPadofexactly '152x152' pixels,in.png formatforiOS versions >= 7.0."
图片如下
然后各种方式尝试解决
网上搜索,有人说是cocoapod引起的7003,需要在podfile文件中添加
post_installdo|installer| copy_pods_resources_path ="Pods/Target Support Files/Pods-MeiyeCommon-MeiyeHD/Pods-MeiyeCommon-MeiyeHD-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
添加完后,pod install或者pod update一下
这个我试了…. 问题依旧.
后来在苹果官网的论坛上面有看到有人也遇到了同样的问题.
Upload iOS 11 Apps: app icon failure
在底下有其他人的回复中提到了一种解决方式,经过我自己的验证,是可以的.
方式如下:
1 正常的编译,生成将会用来上传的 .xcarchive文件
2 右键,选择show in finder,定位到文件所在
3 定位到文件后,在文件上右键,选择 显示包内容,进去
4 打开终端命令,定位到此处
输入命令
find Products/-nameInfo.plist-print0|xargs-0n1 plutil-replaceBuildMachineOSBuild-string16A323
5 再使用XCode或者Application Loader就可以正常上传二进制到itunerConnect了.
给出的解释
升级mac系统到了High sierra(10.13,目前还是测试版,并没有正式版,全新的文件系统 APFS (Apple File System))发现没有这个问题,于是乎,所以给出这种解决方式的作者认为是 APFS的bug.
当然了,你还有另外一种解决方式,就是依旧用旧的XCode8来打包发布,哈哈.