Skip to content

Instantly share code, notes, and snippets.

@brennanMKE
Last active August 29, 2015 13:57
Show Gist options
  • Save brennanMKE/9716345 to your computer and use it in GitHub Desktop.
Save brennanMKE/9716345 to your computer and use it in GitHub Desktop.
What The Archive
#!/bin/sh
// What The Archive!
// The argument passed in should be the Xcode project name so it can find and run lipo on each archive to
// look for each of the supported architectures to help the developer see what is there and what is missing.
// It looks in the DerivedData folder for the most recent matching folder using the given project name.
PROJECT_NAME=$1
BASE_DIR=~/Library/Developer/Xcode/DerivedData/
PROJECT_FOLDER=`ls -t ${BASE_DIR} |grep -i ${PROJECT_NAME}|head -1`
PROJECT_DIR=${BASE_DIR}${PROJECT_FOLDER}
echo Searching $PROJECT_DIR
if [ -d $PROJECT_DIR ]; then
find "${PROJECT_DIR}" -name \*.a -exec lipo -info {} \;
else
echo "Build directory not found"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment