Created
April 2, 2020 18:03
-
-
Save zac/3e45645c0a86a5194476867f225432d4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[[ "$ENABLE_PREVIEWS" = "NO" ]] || exit 0 | |
[[ "$MAC_OS_X_VERSION_MAJOR" -ge "101500" ]] || exit 0 | |
TMPFILE=`mktemp /tmp/SwiftUIcon.swift.XXXXXX` || exit 1 | |
trap "rm -f $TMPFILE" EXIT | |
if [ -z "$SCRIPT_INPUT_FILE_0" ] | |
then | |
echo "error: You must specify your Icon.swift as the first Input File in the Build Phase." | |
exit 1 | |
fi | |
cat ${SCRIPT_INPUT_FILE_0%/*}/*.swift > $TMPFILE | |
xcrun -sdk macosx swift $TMPFILE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment