Quicksilver Plugin Tutorial – Basic Tutorial (Draft)

This page is an archived version of http://quicksilver.infogami.com/ObjectiveCPlugInsBasicTutorial


Basic Tutorial (Draft)



A brief tutorial showing the creation, installation, and running of a Quicksilver plug-in (Objective-C) implementing a simple action.


Ensure a development version of Quicksilver is installed (I put mine under ~/Applications/).

Ensure Developer Tools is installed (I’ve got whichever one gives me Xcode 2.4).

Follow the plug-in template installation instructions (Note that there is an important step involving telling Xcode where certain Quicksilver frameworks live – hint: they live inside the development version of Quicksilver which should now be installed.).


Launch Xcode if it’s not already launched.

From the Assistant (or File -> New Project), choose to create a ‘Quicksilver Plug-in’ (You’ll likely choose a location for your project and a name — I’m going to use ‘MyPlugIn’ as a name for this tutorial).

Edit Info.plist to make the content as follows (A plug-in’s Info.plist allows a plug-in to communicate details about itself to Quicksilver (e.g. whether the plug-in provides an action)):

< ?xml version="1.0" encoding="UTF-8"?>
< !DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
            <string>My Action</string>

        <string>An Author</string>


Edit MyPlugIn.h to make the content:

//  MyPlugIn.h
//  MyPlugIn

#import <qscore /QSObject.h>

@interface MyPlugInActionProvider : NSObject

Edit MyPlugIn.m to make the content:

//  MyPlugIn.m
//  MyPlugIn

#import "MyPlugIn.h"

#import </qscore><qscore /QSNotifyMediator.h>
#import </qscore><qscore /QSTypes.h>
#import <corefoundation /CoreFoundation.h>

@implementation MyPlugInActionProvider

- (QSObject *) performMyAction:(QSObject *)dObject
    NSString *text = [dObject objectForType:QSTextType];
    NSAssert1(text, @"Error: failed to obtain string from: %@", dObject);
    NSDictionary *attributes = \
        [NSDictionary dictionaryWithObjectsAndKeys:@"My Action", QSNotifierTitle, 
                                                   text, QSNotifierText, nil];
    NSAssert(attributes, @"Error: failed to create dictionary for notification");

    return nil;


Save your changes.

Build (this should result in the creation of ‘MyPlugIn.qsplugin’).


Double-click MyPlugIn.qsplugin to initiate plug-in installation.

Answer appropriately when asked by Quicksilver about installing (Plug-ins are installed under ~/Library/Application Support/Quicksilver/).


Ensure Quicksilver is running.

Activate Quicksilver.

Enter text entry mode (hint: use the period key).

Type some text (how about ‘Would you like to play a green vegetable?’ ?)

Choose ‘My Action’ as the action.

Press the return key.

If all went well, you should be notified by Quicksilver of the text you entered via text entry mode (If not, time to check out Console.app).


Related Posts:

  • No Related Posts
This entry was posted in Software and tagged , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *