GUI Chatter Client

chatterclient from the networking chapter works fine if you like living on the command line. Most Mac users (understandably) want to use GUI programs. CFChatterClient is a GUI version of the chatterclient. It uses CFRunLoop and CFSocket to communicate across the network without blocking the application runloop.

In Xcode, create a new Cocoa Application project called CFChatterClient. Edit MainMenu.xib and lay out the UI as shown in Figure 15.2.

Figure 15.2  CFChatterClient user interface

CFChatterClient user interface

Back in Xcode, edit CFChatterClientAppDelegate. Edit the header to look like Example 15.1 and the body like Example 15.2.

Example 15.1. CFChatterClientAppDelegate.h ...

Get Advanced Mac OS X Programming: The Big Nerd Ranch Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.