• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Looking for info on creating Plugins/Modules
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Looking for info on creating Plugins/Modules


  • Subject: Re: Looking for info on creating Plugins/Modules
  • From: Jean-Daniel Dupas <email@hidden>
  • Date: Fri, 12 Dec 2008 18:39:33 +0100


Le 12 déc. 08 à 18:19, glenn andreas a écrit :


On Dec 12, 2008, at 11:01 AM, Jean-Daniel Dupas wrote:


Le 12 déc. 08 à 17:19, glenn andreas a écrit :


On Dec 12, 2008, at 9:37 AM, Sherm Pendley wrote:

On Dec 12, 2008, at 4:05 AM, Chris Hanson wrote:

- Your plug-ins should have a document type and UTI declared in your app's Info.plist so they can be recognized as file packages rather than folders by the Finder and get a nice icon.

Another nice effect of this is the same behavior you get from the System Preferences app with respect to .prefPane bundles. When you double click on a plug-in, the app to which it belongs can open it and ask if you wish to install it, and if so whether to do so for all users (/Library/Application Support) or just for yourself (~/Library/Application Support).


This is a very nice end user experience IMHO. It saves them the trouble of having to navigate through folders they're likely to be unfamiliar with in order to "install" the plug-in.

sherm--


OTOH, if your plugin has the suffix "plugin" (and live in the appropriate directory in your app) your user will be able to manage plugins directly from the Finder. So if you take an application that does this, and do a "get info" on it in the finder, one of the panels in the info window will be "Plug Ins", listing all the plugins in the application, with checkboxes next to them (so you can deactivate them), and a "+" and "-" button that will allow you to add/remove other plugins (this works just like being able to add/remove language localizations for an app).

It's really quite slick, but rarely used. Its just unfortunate that it has to have the generic "plugin" suffix...



My app's plug-ins have a different extension (than "plugin") and appears correctly in the "Get Info" panel of the Finder. I think that as long as you put them in the Bundle PlugIns directory (the one returns by the NSBundle method) the Finder is able to find them and to manage them.



Does the "+" button (to install a new plugin) work correctly? In pre-UTI days, there was no way to tell Finder/LaunchServices that ".myAppPlugin" was actually a plugin (as opposed to just a document) - does setting the UTI's "conform to" to include com.apple.plugin do the trick?

Setting the UTI to bundle do the trick.
In pre UTI days, I think it was possible by defining a document (in Info.plist document section) with your plugin extension, a four char code "type", and the "is package" box checked, and finally by adding a PkgInfo file into your bundle content (using the GENERATE_PKGINFO_FILE build setting) with the corresponding app and creator types.


That could definitely be the best of both worlds (even better would be automatic support of an Application Support folder so the user doesn't need write access to the app)...

(Ironically, if you click the "+" button, the finder shows a file navigation dialog that allows you to navigate inside other applications, allowing you to access everywhere _except_ their PlugIns folder, which, of course, is one of the most likely place to find plugins (say you're updating to a new version of an app and want to use the plugins from the old version)).


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Looking for info on creating Plugins/Modules (From: Tom Jones <email@hidden>)
 >Re: Looking for info on creating Plugins/Modules (From: "Kyle Sluder" <email@hidden>)
 >Re: Looking for info on creating Plugins/Modules (From: Chris Hanson <email@hidden>)
 >Re: Looking for info on creating Plugins/Modules (From: Sherm Pendley <email@hidden>)
 >Re: Looking for info on creating Plugins/Modules (From: glenn andreas <email@hidden>)
 >Re: Looking for info on creating Plugins/Modules (From: Jean-Daniel Dupas <email@hidden>)
 >Re: Looking for info on creating Plugins/Modules (From: glenn andreas <email@hidden>)

  • Prev by Date: Re: Looking for info on creating Plugins/Modules
  • Next by Date: Re: KVO on NSSlider not observing
  • Previous by thread: Re: Looking for info on creating Plugins/Modules
  • Next by thread: Re: Looking for info on creating Plugins/Modules
  • Index(es):
    • Date
    • Thread