2

I'm trying to create a dock tile plugin.

  • I've added a new Target to my project with Wrapper Extension as docktileplugin
  • I've added a Class that implements NSDockTilePlugIn with method:

    -(void)setDockTile:(NSDockTile *)dockTile
    {
        NSLog(@"DOCK TILE PLUG-IN LOADED!");
    }
    
  • I've set this class as Principal Class in its info.plist

  • I've set this new DockTile Target as a Target Dependency for my main application and I've added it to "Copy Files / Destinantion: Plugins" Build Phase
  • I've set the NSDockTilePlugin keyword in my Main Application's Info.plist as the name of the Dock Tile Target without extension.

I've followed the documentation, and even downloaded the example program that apple provides located: http://developer.apple.com/library/mac/#samplecode/DockTile/Listings/DockTilePlugIn_DockTilePlugIn_m.html

The example program doesn't work, but I at least get a console error:

    12/20/12 8:29:49.217 PM com.apple.dock.extra: Could not load Dock Extra class from the bundle /Users/[MYNAME]/Downloads/DockTile/build/Release/DockTileApp.app//Contents/PlugIns/DockTile.docktileplugin

Please help.

gravityab
  • 21
  • 4

2 Answers2

1

@gravityab After much searching I found an unmaintained version and I've now updated it, added another feature to the sample and put it on github here - https://github.com/CartBlanche/MacDockTileSample. Feel free to fork or submit PRs if anyone notices I've done something wrong.

Dominique
  • 817
  • 1
  • 5
  • 10
0

After much trial and error, I discovered that you must have the following build configurations for your dock tile plugin to run properly.

Other Linker Flags: -ObjC
OS X Deployment Target: 10.6 or above, depending on your current OSX version
Architecture: Standard (32/64-bit Intel)

gravityab
  • 21
  • 4
  • That link to the sample code no longer works. Any chance you still have it and can upload the working version of the sample to github or a similar repository?? Thanks! – Dominique Dec 16 '19 at 18:08
  • I'm sorry for the super late reply. I do not have the sample that Apple provided for working Dock Tile plugin nor do I remember what it looks like sadly: If I had to take a stab, I think this might be the sample in Apples archived sample section: https://developer.apple.com/library/archive/samplecode/DockBrowser/Introduction/Intro.html#//apple_ref/doc/uid/DTS10000695 I ended up getting a DockTile plugin working using all of the steps above, but the feature request that sparked the need for this feature 8 years ago was eventually scrapped. – gravityab Jun 12 '20 at 22:34