Sidekick Sample Plugin
This is an example project showing you how to create plugins for Sidekick. It simply speaks the text entered by the user using Mac OS's
Getting started with the SDK
To properly set up your plugin, there are a few settings you'll have to customize. If it helps, you can start using this provided project as a base, but be sure to customize the bundle identifier and class names.
- Remember that your code is being loaded into Sidekick's global namespace, so make an effort to use unique class names and prefixes. The following prefixes belong to us and should not be used:
-undefined dynamic_lookupto your linker flags.
- Set the
SKPluginVersionkey in your Info.plist to 1
- Set garbage collection to supported (
GCC_ENABLE_OBJC_GC -fobjc-gc), and not required so that when we migrate away from GC your plugin will keep working.
- Subclass SKPlugin and make this subclass your bundle's principal class.
- Subclass SKAction to create your actions, and update the list returned by your plugin's
- If needed, subclass
SKOptionSheetControllerto provide more complex interaction in your action's configuration sheet.
- If you need a user interface, don't forget to disable your window's "Visible At Launch" property. You must also set an outlet for this window on File's Owner (an SKOptionSheetController).
- If you need to access your plugin's bundle, don't use
[NSBundle mainBundle], instead use the
-bundlemethod on your
SKActionobjects keep a reference to their plugin instance.