Viewing the CallbackHandler and ApplicationCallbackHandler Files

Look at CallBackHandler and ApplicationCallbackHandler files in Xcode.

CallbackHandler is a subclass of SUPDefaultCallbackHandler, and listens for events sent from the server. It also implements the SUPApplicationCallback protocol to get connection, registration, and device state change notifications. The header, CallbackHandler.h, is referenced in a number of classes in this application, so create it first. You can create new Objective-C class files from the main menu: File > New > New File.

ApplicationCallbackHandler is a subclass of SUPApplicationDefaultCallback, and it gets connection, registration, and device state change notifications.

There are two threads involved in the SUP101 application—the main thread, which is driven by the client application user interface controller, and the mobile object client access thread, which handles data synchronization with the server. In iOS, all code that updates the user interface must be called on the main thread, so Sybase recommends, as a best practice, that you send notifications that might trigger changes to the interface from the main thread.

  1. Click the CallbackHandler.h file to view the provided source code.
  2. Click the CallbackHandler.m file to view the provided source code.
  3. Click the ApplicationCallbackHandler.h file to view the provided source code.
  4. Click the ApplicationCallbackHandler.m file to view the provided source code.