应用图标丢失iOS 11 [英] App Icon missing iOS 11
本文介绍了应用图标丢失iOS 11的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
更新到Xcode 9(9A235)后,在iOS 11上运行后,缺少应用程序图标。在以前的版本中,它运行正常。此问题是由 CocoaPods 引起的。我已经尝试过此解决方案,但这给了我错误。
After updating to Xcode 9 (9A235), app icon was missing after running on iOS 11. It was working fine in previous version. This issue is caused by CocoaPods. I have tried this solution but this is giving me error.
处理Podfile的安装后挂钩时发生错误。
An error occurred while processing the post-install hook of the Podfile.
推荐答案
尝试在您的Podfile中添加此脚本。
Try adding this script in your 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
有关此问题的更多信息可以在此处找到。
More information about this issue you can find here.
这篇关于应用图标丢失iOS 11的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文