Skip to content

Instantly share code, notes, and snippets.

@zlargon
Last active August 29, 2015 14:24
Show Gist options
  • Save zlargon/571c0df2d270524b76ce to your computer and use it in GitHub Desktop.
Save zlargon/571c0df2d270524b76ce to your computer and use it in GitHub Desktop.
When Xcode is upgrade, Xcode Plugin will not work at all. Use this script to update all your Xcode plugin's compatibility.
#!/bin/bash
# When Xcode is upgrade, Xcode Plugin will not work at all.
# Use this script to update all your Xcode plugin's compatibility.
# https://github.com/supermarin/Alcatraz/issues/213#issuecomment-91288935
# show Xcode version and UUID
xcodebuild -version
uuid=$(defaults read /Applications/Xcode.app/Contents/Info DVTPlugInCompatibilityUUID)
echo "UUID $uuid"
echo ""
find ~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins -name Info.plist -maxdepth 3 | while read plist
do
# check UUID
if [ -n "$(defaults read "$plist" | grep $uuid)" ] ; then
echo "UUID is already added to $plist"
continue
fi
# add UUID to .plist
echo "Add UUID to $plist"
defaults write "$plist" DVTPlugInCompatibilityUUIDs -array-add $uuid
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment