Skip to content

Instantly share code, notes, and snippets.

@Ziewvater
Last active August 29, 2015 14:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Ziewvater/3190e20b1ace2ab3c3b6 to your computer and use it in GitHub Desktop.
Save Ziewvater/3190e20b1ace2ab3c3b6 to your computer and use it in GitHub Desktop.
Bash script for getting rid of bad Interface Builder state that can occur in Xcode 6.3.
#!/usr/bin/env bash
WORKSPACE=`find . -name "*.xcworkspace" | grep -v "project.xcworkspace"`
if [[ -n $WORKSPACE ]]; then
$(rm $WORKSPACE/xcuserdata/$USER.xcuserdatad/UserInterfaceState.xcuserstate)
else
PROJECT=`find . -name "*.xcodeproj"`
$(rm $PROJECT/xcuserdata/$USER.xcuserdatad/UserInterfaceState.xcuserstate)
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment