plugin compatibility for macOS Sierra (10.12)

Posted: July 27th, 2016 | Author: | Filed under: macOS, Mail, Programming | Tags: , , , , , , , , , | 1 Comment » in macOS 10.11 and earlier used to check the plugins compatibility using the SupportedPluginCompatibilityUUIDs key in the plugin’s Info.plist. For example a Mail plugin would only be compatible with macOS 10.11.6 if its Info.plist contained the following:

</array> version 10.0 in macOS Sierra (10.12) now uses a different key to check the plugins compatibility. It now requires a key with the format Supported%ld.%ldPluginCompatibilityUUIDs where “%ld.%ld” is the operating system version like “10.12”.

If you want to make your plugin compatible with macOS Sierra, you will need to add a key in your Info.plist like:


Note that the UUID “36CCB8BB-2207-455E-89BC-B9D6E47ABB5B” is for macOS Sierra 10.12 beta 3.

Also by default the Mail plugins support is disabled. In order to enable it you first need to run in the Terminal the following:

defaults write EnableBundles -bool true

Related post: Disable swipe to delete in on OS X 10.11

Disable swipe to delete in on OS X 10.11

Posted: May 10th, 2016 | Author: | Filed under: code injection, macOS, Mail | 18 Comments »

OS X 10.11 ‘El Capitan’ added a new feature to ‘Swipe to manage your inbox’:

Swipe to manage your inbox.
Now you can take care of your email with a swipe, just like on your iOS devices. Need to triage your inbox? Swipe right to mark an email as read or unread, or swipe left to delete. You’ll be focused on what’s important in no time.

Swipe To Delete


I find this new feature extremely annoying as I keep triggering it by accident. Sadly it seems that there is no preference (even secret preference) to disable this feature. But the good news is that supports plugins.

To disable this feature, I created a simple plugin. A precompiled version for Mail 9.3 (3124)
(OS X 10.11.4) can be downloaded here:


You can download the source code here : Download ‘DisableSwipeGesture’ Source Code


Installation using the precompiled version for Mail 9.3 (3124) – OS X 10.11.4:

  • Download the precompiled version
  • Unzip
  • Copy the file into ~/Library/Mail/Bundles/
  • Relaunch


Installation for other versions of

  • Download the DisableSwipeGesture source code
  • Open the project in Xcode
  • Build
  • Relaunch


How does it work? uses a standard NSTableView to support the swipe to delete gesture. It implements the AppKit -tableView:rowActionsForRow:edge: delegate method to add the swipe to delete feature.

Before handling a swipe event, AppKit checks if swipe to delete is supported with the internal method -(BOOL)[NSTableView _allowSwipeToDeleteForEvent:]. The default implementation checks if the NSTableView is a view based tableview and if there is a delegate. The ‘DisableSwipeGesture’ Mail plugin overrides this internal method to always return NO i.e. to never allow swipe to delete. Note that this plugin only changes the behavior of, it does not affect any other app. However the same mechanism could be used to disable the swipe to delete feature for any OS X app supporting plugins. plugin compatibility

Before loading any plugin, checks if the plugin’s Info.plist contains the current ‘PluginCompatibilityUUID’ value. If this is not the case, will refuse to load the plugin and you will see an alert:

Incompatible Plugin

If you use this ‘DisableSwipeGesture’ plugin and you update though an OS X update, you will need to update the PluginCompatibilityUUID value in the Info.plist of the ‘DisableSwipeGesture’ plugin. The simplest solution is to recompile the plugin using the steps provided in ‘Installation for other versions of’. The Xcode project has a build phase that will extract the PluginCompatibilityUUID from /Application/ and copy it into the Info.plist.