iOS11 AppIcon不显示

在Podfile添加如下代码

post_install do |installer|

copy_pods_resources_path = "Pods/Target Support Files/Pods-工程名/Pods-工程名-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


在Pods-工程名-resources.sh文件添加如下代码

printf"%s\0""${XCASSET_FILES[@]}"| xargs-0xcrun actool --output-format human-readable-text --notices --warnings --platform"${PLATFORM_NAME}"--minimum-deployment-target"${!DEPLOYMENT_TARGET_SETTING_NAME}"${TARGET_DEVICE_ARGS} --compress-pngs --compile"${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"--app-icon"${ASSETCATALOG_COMPILER_APPICON_NAME}"--output-partial-info-plist"${BUILD_DIR}/assetcatalog_generated_info.plist"

fi

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容