今天更新xcode 9 后,在运行老项目时遇到一个小坑,就是无论如何都不显示appicon,在网络上找到了方法,单并没有解决,其实不是方法的问题,只是有一个小细节要注意,在这里提示一下.
出现这个问题的原因就是cocoapods与ios 11出现点问题,这里你要更新你的cocoapods至最新版本.然后在你的podfile文件中添加如下代码.这里一定要注意,要在end下面,如图所示
代码:
?| 1 2 3 4 5 6 7 8 |
post_install do |installer|
copy_pods_resources_path = "pods/target support files/pods-fuelcardapp/pods-fuelcardapp-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
|

总结
以上所述是小编给大家介绍的ios 11 appicon不显示问题的解决方法,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对服务器之家网站的支持!
原文链接:http://blog.csdn.net/seven_eleven_lgw/article/details/78247757








发表评论
◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。