Asset Catelog issue with multiple targets

后端 未结 4 1832
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-14 11:31

I have a project with multiple targets. Assume the targets are named Target-A, Target-B and so on. For every target I have a different asset catalog of App Icons. They are n

4条回答
  •  星月不相逢
    2020-12-14 12:11

    So I wrote a script to delete all those lines which are pointed out by Lukapple.Paste the code to run Script in the xcode project after Target Dependencies.

    echo "run script to remove Pods-resources.sh"
    file_name="${PROJECT_DIR}/Pods/Target Support Files/Pods/Pods-resources.sh"
    function remove_wrapper_extensions {cat "$1" | awk 'BEGIN { suppress_output = 0; } /^if \[\[ -n/ { suppress_output = 1; } (!suppress_output) { print $0; } /^fi$/ { suppress_output = 0; }' > "${1}.1"}
    function remove_case_statement {cat "$1" | awk 'BEGIN { suppress_output = 0; } /\s*\*\.xcassets\)$/ { suppress_output = 1; } (!suppress_output) { print $0; } /;;/ && (suppress_output) { suppress_output = 0; }' > "${1}.2"}
    remove_wrapper_extensions "$file_name"
    remove_case_statement "${file_name}.1"
    rm "${file_name}"
    rm "${file_name}.1"
    mv "${file_name}.1.2" "$file_name"
    chmod +x "${file_name}"
    

提交回复
热议问题