Created
April 20, 2011 04:41
-
-
Save netj/930384 to your computer and use it in GitHub Desktop.
A script for fixing disabled Mail.app bundles due to SupportedPluginCompatibilityUUIDs
This file contains 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
#!/usr/bin/env bash | |
# A script for fixing disabled Mail.app bundles due to SupportedPluginCompatibilityUUIDs | |
# Author: Jaeho Shin <[email protected]> | |
# Created: 2011-03-24 | |
# See-Also: http://stib.posterous.com/how-to-fix-unsupported-plugins-after-upgradin | |
set -eu | |
newMailUUID=$(defaults read /Applications/Mail.app/Contents/Info PluginCompatibilityUUID) | |
newMsgUUID=$(defaults read /System/Library/Frameworks/Message.framework/Resources/Info PluginCompatibilityUUID) | |
cd ~/Library/Mail | |
for bundle in "Bundles"*"("*")"/*.mailbundle; do | |
[ -d "$bundle" ] || continue | |
if [ -w "$bundle"/Contents/Info.plist ]; then | |
echo "$bundle: Re-enabling with fixed SupportedPluginCompatibilityUUIDs" | |
defaults write "$PWD"/"$bundle"/Contents/Info SupportedPluginCompatibilityUUIDs -array-add "$newMailUUID" | |
defaults write "$PWD"/"$bundle"/Contents/Info SupportedPluginCompatibilityUUIDs -array-add "$newMsgUUID" | |
mv "$bundle" Bundles/ | |
else | |
echo "$bundle: Skipping (Info.plist not writable)" | |
fi | |
done | |
rmdir -p "Bundles"*"("*")" 2>/dev/null |
Just a quick note. I stumbled on this looking for a method to update a plugin after upgrading to Mavericks. Message.framework has been renamed to Mail.framework, moved to PrivateFrameworks, and no longer has a plugincompatibilityuuid. Thus the 'newMsgUUID' var in the above script will not be set properly on Mavericks. I had to go get a plug-in update from the plug-in author for mavericks compatibility.
It can be easily fixed by removing line 9 and 17. The script was tested on osx 10.9.3 and worked like a charm after this small adaption.
The script should become:
#!/usr/bin/env bash
# A script for fixing disabled Mail.app bundles due to SupportedPluginCompatibilityUUIDs
# Author: Jaeho Shin <[email protected]>
# Created: 2011-03-24
# See-Also: http://stib.posterous.com/how-to-fix-unsupported-plugins-after-upgradin
set -eu
newMailUUID=$(defaults read /Applications/Mail.app/Contents/Info PluginCompatibilityUUID)
cd ~/Library/Mail
for bundle in "Bundles"*"("*")"/*.mailbundle; do
[ -d "$bundle" ] || continue
if [ -w "$bundle"/Contents/Info.plist ]; then
echo "$bundle: Re-enabling with fixed SupportedPluginCompatibilityUUIDs"
defaults write "$PWD"/"$bundle"/Contents/Info SupportedPluginCompatibilityUUIDs -array-add "$newMailUUID"
mv "$bundle" Bundles/
else
echo "$bundle: Skipping (Info.plist not writable)"
fi
done
rmdir -p "Bundles"*"("*")" 2>/dev/null
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you find your Mail bundles broken after some Software Updates on Snow Leopard,
Most of your bundles will continue to work from now on.
Otherwise, if Mail keeps crashing, then this means your bundle really isn't compatible with the new Mail app. Go to ~/Library/Mail/Bundles/ from Finder and delete the suspicious ones to recover.