Fixed the Cocoa example project and updated it to use the code generator.