A child of NSView that handles the separation of "mouseUp" into "handleSingleClick", "handleDoubleClick" and "handleTripleClick". Simply derive your view from BRMouseUpView instead of NSView to have instant handling of single, double and triple mouse clicks (on the mouse up side). Or use as a code base for your own implementation.
This is a complete example on all the necessary steps to add receipt validation to an OS-X project. It is a series of articles in 7 parts, the above link links to the introduction. There is an additional part 8 that shows how to use Receigen with Swift.
This code example shows how to implement multi staged file reading using NSStream (NSInputStream) from Swift. Multi staged file reading is useful when first a file header must be read, and then only a part of the data.