Hunch

2

How I wrote DroPub in two days

September 20 by Rasmus Andersson, tagged cocoa, programming and dropub, filed under software

Yesterday I wrote DroPub — a simple but powerful little OS X application which transparently handles file transfers “from the desktop”.

Even though it has a lot of features, have been tested, updates itself and so on, I only spent about two days on the whole project — for me, this is the essence of Cocoa.

DroPub is heavily based on NSOperations and uses a hierarchy model for structuring operations. NSOperation hierarchies are powerful means for writing most types of “service” applications. The code can easily be followed by a Cocoa programmer and the operating system frameworks and libraries can give really good performance.

Continue reading...

4

DroPub 1.0

September 20 by Rasmus Andersson, tagged osx, application and cocoa, filed under software

DroPubI just released the first official version of DroPub. It’s a mute little OS X application which makes drop boxes and sending stuff to remote servers as simple as it gets — just put a file in a regular folder and you’re done.

Try it out — simply download, double click and create a folder.

Uses SCP (secure copy over SSH) and thus you need to add your SSH key to the remote server in order for things to work. A future version will introduce storing of passwords in the KeyChain.

It normally lives in the menu bar, but can live in the dock also

It normally lives in the menu bar, but can live in the dock also.

Preferences

Virtually unlimited number of folders can be watched and configured.

Further reading: How I wrote DroPub in two days.

17

Introduction to Cocui

September 16 by Rasmus Andersson, tagged cocoa, cocui, ui and screencast, filed under software

Cocui is a way to quickly create functional Cocoa applications using WebKit. Download and read more at http://github.com/rsms/cocui. You can watch the video in full resolution at Vimeo.

1

Extending Xcode

May 4, 2008 by Rasmus, tagged cocoa, objective-c, osx, plugin, programming and xcode, filed under software

xcode-icon-256A lot of software enables the user to extend it in order to enhance productivity and customize her work environment. An excellent example of this kind of software is TextMate. But I’m not going to talk about TextMate today, but instead another very popular development tool for the Mac OS – Apple Xcode.

Xcode have had plug-in support during most of it’s life time so far, but the means for creating new plugins has been (and is still in many ways) something only Apple has. Documentation is extremely sparse and most of that which is available is outdated. If you bring up the “New project…” (CMD+SHIFT+N) you will find “AppleScript Xcode Plug-in” inside the “Standard Apple Plug-ins” category. However great this might sound, it restricts you to only fiddle with AppleScript, which in my point of view is just a pain in the ass. (AppleScript, that is. One might call it a necessary evil)

Writing a “real” plugin (using Cocoa, AppKit aso.) should be as easy as writing a normal Application, since a xcplugin is just a simple bundle like any other OS X bundle. What is different though, is that you probably want to fiddle with Xcode itself. (i.e. change the color of some text based on some rules, which for instance a language extension would do) Doing so requires knowledge (i.e. headers) about how to poke around. Unfortunately Apple does not expose these interfaces. Damien Bobillot maintains a (somewhat outdated) document called Xcode’s Plugin Interface in which he provides a package of private headers one must have, in order to use the DevToolCore framework.

Continue reading...