Adapted ofxTextWriter for my needs.
Added a working Xcode example.