Xcode 8 build crash on iOS 9.2 and below

前端 未结 8 1559
南方客
南方客 2020-11-27 10:53

When I build my app with Xcode 8 GM Seed and run it on an iOS 9.2 below device OR simulator, I get strange EXC_BAD_ACCESS crashes during app startup or a few seconds after

8条回答
  •  盖世英雄少女心
    2020-11-27 11:13

    I hope this bash script may help you. Input argument is directory than contains all xcassets of your project. This script will set sRGB profile to all pngs. It helped me:)

    #!/bin/bash
    DIRECTORY=$1
    echo "------------------------------"
    echo "Passed Resources with xcassets folder argument is <$DIRECTORY>"
    echo "------------------------------"
    echo "Processing asset:"
    XSAASSETSD="$(find "$DIRECTORY" -name '*.xcassets')"
    for xcasset in $XSAASSETSD
    do
        echo "---$xcasset"
        IMAGESETS="$(find "$xcasset" -name '*.imageset')"
        for imageset in $IMAGESETS
        do
            echo "------$imageset"
            FILES="$(find "$imageset" -name '*.png')"
            for file in $FILES 
            do
                echo "---------$file"
                sips -m "/System/Library/Colorsync/Profiles/sRGB Profile.icc" $file --out $file
            done
        done
    done
    echo "------------------------------"
    echo "script successfully finished"
    echo "------------------------------"
    

提交回复
热议问题