About Me

I am Kevin Wojniak, a Mac OS X software developer.

Mar 6

It has arrived

The iPhone SDK is here, and it is slick.

Mar 3

Don’t Pollute User Space

From Apple’s documentation:

With the exception of the ~/Library directory, your application should never install files into the user’s home directory. In particular, you should never install files into a user’s Documents directory or into the /Users/Shared directory. These directories should only be modified by the user.

I wish Microsoft and Adobe understood this.

Feb 19

Leopard 10.5.2 fixes NSShadow bug

One of the annoyances I found in Leopard was NSShadow’s shadowOffset didn’t work exactly the same as it did under Tiger. It was always drawn 1 pixel off. I use NSShadow for drawing the “etched text” appearance that is now prevalent in Leopard. Fortunately, I just found out that 10.5.2 now fixes this so that 10.5.2 and 10.4.X both draw shadows the same way. You can read more from the Cocoa mailing list archives.

Nov 21

QuickLook plugin for AppleScripts

I have written a small QuickLook plugin that gives you a preview of an AppleScript script file.

QuickLook

It’s a quick and dirty implementation since I used NSAppleScript. I’m sure a more generic method using normal syntax highlighting would be better.

Download

Oct 4

Read .webloc URLs from the command line

Need to read the URL of a .webloc file from the command line?

All you need is this simple line:

strings SomeFile.webloc/rsrc | grep http | head -n 1

Sep 25

Cocoa Skyhook Wireless API

I have released a demo Cocoa wrapper for the Skyhook Wireless API.

Skyhook’s publicly available SDK allows developers to quickly and easily start location-enabling their applications using Skyhook’s software-only Wi-Fi Positioning on the platform of their choice.

They are running a contest for the best Mac application. Whoever wins gets an iPhone. Get your apps in by October 29.

The demo application displays your coordinates in longitude and latitude, and provides a button to map the location with Google Maps.

Make sure you sign up for an API key.

You can grab the code from my Google Subversion repository:
svn co http://kaincode.googlecode.com/svn/trunk/wps

Update: originally forgot to add the .xcodeproj file to the repository - it is now checked in.

Sep 22

Cocoa Memory Management Tip: Sheets

When opening a sheet with a function like NSBeginAlertSheet (or a method that starts with beginSheet…) and you are passing in a contextInfo, make sure you do not send it an autoreleased object! The object is not guaranteed to hang around for the life of the window.

Instead, retain whatever is passed in, and release it in the didEndSelector.

Sep 6

Will Apple release an iPod touch SDK?

Now that Apple has an iPod with iPhone-like capabilities, one has to wonder: will Apple release an SDK for the iPod touch?

Steve Job’s reasoning for not having third-party applications on the iPhone was the network:

You don’t want your phone to be an open platform. You need it to work when you need it to work. Cingular doesn’t want to see their West Coast network go down because some application messed up.

That excuse is no longer valid with the iPod touch.

Of course there are already working hacks to enable third-party applications on the iPhone (and iPod touch, soon). But that is not realistic for the majority of customers, no matter how easy it becomes (see iPod Linux).

The iPod touch could become the ultimate PDA. All Apple has to do is release an SDK - and WWDC 08 would be just enough time to get the kinks worked out.

Aug 30

Semulov 1.2 Released

I have released Semulov 1.2 today. The main new changes are improved sorting for hard drives, CDs, DVDs, disk images and WebDAV volumes. For disk images, there is a Discard feature. Discarding a disk image lets you unmount the volume and delete the disk image, all in one click of the menu. Just hold down the Option key and the menu item will become available.

Aug 14

qtplay Universal Binary

I have built a universal binary of qtplay, “a command line utility to play Audio CD’s, MP3’s, and other music files.”

In addition to being a universal binary, I’ve moved it to an Xcode project, fixed a few warnings, and removed a deprecated function call.

Download the binary directly, or grab the source (from Subversion).