IOS 11 appicon does not display the problem summary


After updating Xcode 9 today, I encountered a small pit when running the old project, that is, appicon is not displayed anyway. I found a method on the network, but it has not been solved. In fact, it is not a problem of the method, but there is a small detail to pay attention to. Here is a hint

The reason for this problem is that there are some problems with cocoapods and IOS 11. Here you need to update your cocoapods to the latest version. Then add the following code to your podfile file. Be sure to note that it should be under end, as shown in the figure


post_install do |installer|
copy_pods_resources_path = "Pods/Target Support Files/Pods-FuelCardApp/"
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 =
new_contents = text.gsub(string_to_replace, assets_compile_with_app_icon_arguments), "w") {|file| file.puts new_contents }


The above is the solution to the problem that IOS 11 appicon does not display. I hope it will help you. If you have any questions, please leave me a message and Xiaobian will reply to you in time. Thank you very much for your support to the developeppaer website!