Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save chunta/1a503ba68808a1243706f8334b68b676 to your computer and use it in GitHub Desktop.
Save chunta/1a503ba68808a1243706f8334b68b676 to your computer and use it in GitHub Desktop.
RemoveSimulatorArch
find “$PROJECT_DIR/Carthage/Build/iOS” -name ‘*.framework’ -type d | while read -r FRAMEWORK
do
PATH_COUNT=$(echo “$FRAMEWORK/” | grep -o ‘/’ | wc -l)
FILE_NAME=$(echo $FRAMEWORK | cut -d ‘/’ -f $PATH_COUNT | cut -d ‘.’ -f 1)
EXECUTE_FILE=“$FRAMEWORK/$FILE_NAME”
echo $EXECUTE_FILE
if $(lipo $EXECUTE_FILE -verify_arch i386) ; then
lipo -remove i386 $EXECUTE_FILE -o $EXECUTE_FILE
fi
if $(lipo “$FRAMEWORK/$FILE_NAME” -verify_arch x86_64) ; then
lipo -remove x86_64 $EXECUTE_FILE -o $EXECUTE_FILE
fi
lipo -info $EXECUTE_FILE
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment