Posted on 06-09-2012 01:52 AM
Hi all,
Anyone had any experiences deploying Safari extensions? Can you share your experience & workflow?
Cheers!
Solved! Go to Solution.
Posted on 12-13-2013 01:56 PM
tidying up, this is what i did: http://macmule.com/2012/08/01/deploying-installing-safari-toolbars/
Posted on 06-11-2012 08:12 AM
Haven't done it, but it looks possible based on what I can see. It looks like at least 2 things happen when installing a Safari extension.
1- The .safariextz file gets added to /Users/username/Safari/Extensions/
2- The Extensions.plist file in the same location gets updated with a new dict in the array to indicate the extension is installed. It should be possible to use PlistBuddy to add the relevant info into the array. Deploying the updated array itself would probably overwrite other user installed extensions so that wouldn't be recommended.
For example, installing ClickToFlash.safariextz puts this into the plist-
<dict>
<key>Added Non-Default Toolbar Items</key>
<array/>
<key>Archive File Name</key>
<string>ClickToFlash.safariextz</string>
<key>Bundle Directory Name</key>
<string>ClickToFlash.safariextension</string>
<key>Enabled</key>
<true/>
<key>Hidden Bars</key>
<array/>
<key>Removed Default Toolbar Items</key>
<array/>
</dict>
In my very quick tests, just dropping the .safariextz file doesn't do it, even after quitting/restarting Safari. It won't show up as installed until that plist is updated with the appropriate info.
I suspect there is 3rd piece going on that tells Safari to read the new Plist file in without having to relaunch it. Maybe a launchagent of some kind. There's probably some info out there on exactly what goes on behind the scenes that a little Google searching will turn up.
All in all though, it looks possible to do. I may give it a go myself just as an experiment.
Posted on 06-11-2012 08:28 AM
On second thought, it may not be possible due to security considerations in Safari. Its possible Apple designed Safari extension installation to not be allowed without user confirmation. Otherwise a piece of malware could install itself into Safari in this same way.
Posted on 12-13-2013 01:56 PM
tidying up, this is what i did: http://macmule.com/2012/08/01/deploying-installing-safari-toolbars/