Last active
December 20, 2023 10:27
-
-
Save Rafal-Prazynski/74b910fbaaf27540742dac49a84843ff to your computer and use it in GitHub Desktop.
RemoveSimulatorArch
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
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