使用Xcode 9和Application Loader:
但是你可以看到所有必需的图标:
是什么情况?
这是我的podfile:
use_frameworks! source 'https://github.com/CocoaPods/Specs.git' def pods pod 'GoogleMaps' pod 'PickerView' pod 'SWNavigationController' pod 'Branch' pod 'JTAppleCalendar', :git => 'https://github.com/patchthecode/JTAppleCalendar.git', :branch => 'master' pod 'SVProgressHUD' end def universal_pods pod 'AFNetworking' pod 'Crashlytics' pod 'Fabric' pod 'MagicalRecord' end target 'FieldService' do pods universal_pods end target 'FieldServiceTests' do pods universal_pods end target 'FieldServiceTodayTimer' do universal_pods end target 'FieldServiceTodayCurrent' do universal_pods end post_install do |installer| copy_pods_resources_path = "Pods/Target Support Files/Pods-FieldService/Pods-FieldService-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 inhibit_all_warnings!
它根本不起作用;(
修改
Contents.json: ASCII text Icon-60.png: PNG image data, 60 x 60, 8-bit/color RGBA, non-interlaced Icon-60@2x.png: PNG image data, 120 x 120, 8-bit/color RGBA, non-interlaced Icon-60@3x.png: PNG image data, 180 x 180, 8-bit/color RGBA, non-interlaced Icon-76.png: PNG image data, 76 x 76, 8-bit/color RGBA, non-interlaced Icon-76@2x.png: PNG image data, 152 x 152, 8-bit/color RGBA, non-interlaced Icon-Small.png: PNG image data, 29 x 29, 8-bit/color RGBA, non-interlaced Icon-Small@2x-1.png: PNG image data, 58 x 58, 8-bit/color RGBA, non-interlaced Icon-Small@2x.png: PNG image data, 58 x 58, 8-bit/color RGBA, non-interlaced Icon-Small@3x.png: PNG image data, 87 x 87, 8-bit/color RGBA, non-interlaced Icon-Spotlight-40.png: PNG image data, 40 x 40, 8-bit/color RGBA, non-interlaced Icon-Spotlight-40@2x-1.png: PNG image data, 80 x 80, 8-bit/color RGBA, non-interlaced Icon-Spotlight-40@2x.png: PNG image data, 80 x 80, 8-bit/color RGBA, non-interlaced Icon-Spotlight-40@3x.png: PNG image data, 120 x 120, 8-bit/color RGBA, non-interlaced Icon-Spotlight-41.png: PNG image data, 40 x 40, 8-bit/color RGBA, non-interlaced Icon-Spotlight-42.png: PNG image data, 40 x 40, 8-bit/color RGBA, non-interlaced Icon-Spotlight-43.png: PNG image data, 20 x 20, 8-bit/color RGBA, non-interlaced Icon-iPadPro@2x.png: PNG image data, 167 x 167, 8-bit/color RGBA, non-interlaced fieldservice.png: PNG image data, 1024 x 1024, 8-bit/color RGBA, non-interlaced
答案 0 :(得分:5)
我有同样的问题。检查一下:solution
只需将以下代码添加到您的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
end
然后在控制台pod install
编辑:
如果无效,请找到您应用的xcarchive文件,右键单击>>显示包裹内容,导航至产品>>应用程序>>您的应用的名称>>显示包装内容。从此处找到信息plist,并将BuildMachineOsBuild更改为16A323。这基本上欺骗了计算机,认为它是在较旧的操作系统上。问题似乎源于High Sierra。然后提交应用程序。
答案 1 :(得分:5)
答案 2 :(得分:4)
在尝试了上面删除了一些错误的一些建议之后,在我的情况下,我可以通过在项目的.xcassets文件中重命名AppIcon来解决所有问题。该项目使用CocoaPods,其中一些pod包含其中包含AppIcon的示例项目。因此,我只是重命名了我的AppIcon并更改了项目设置中的引用,而不是删除它们。从那一刻起,经过数小时的反复试验后,它终于得到了处理。
使用Xcode查看Pods xcassets文件时,他们缺少营销图标和iPad Pro图标定义(较旧的库)。这些是我得到的确切错误。在存档中,文件现在名为AppIcon,因此它们在Info.plist文件中引用。
PS:要了解您是否拥有多个AppIcon资产,可以使用find . -name AppIcon*
答案 3 :(得分:2)
查找Products / -name Info.plist -print0 | xargs -0n1 plutil -replace BuildMachineOSBuild -string 16A323
然后继续定期上传。最后,您将看到一个关于缺少营销图标的警告弹出窗口,但构建将通过
答案 4 :(得分:2)
答案 5 :(得分:1)
在我的情况下,其中一个Pods的资源有 .xcassets 。排除此广告连播后图标错误消失。最后,通过将 .xcassets 替换为 .bundle 来修复pod。
部分.podspec更改日志:
- s.resources = '**/*.xcassets'
+ s.resources = '**/*.bundle'
答案 6 :(得分:0)
正如@Daniel Kuta所说,解决方案是:
但是,上述解决方案将删除前三个错误,但不会删除最后一个错误。
答案 7 :(得分:0)