Display Logs for the Objective-C Client

In this procedure, you will learn how to gather data on your Kaazing WebSocket Gateway Objective-C client.

Before You Begin

This procedure is part of Checklist: Build Objective-C (iOS) Clients Using Kaazing WebSocket Gateway:

  1. Use the Kaazing WebSocket Gateway Objective-C Client API
  2. Secure Your Objective-C Client
  3. Display Logs for the Objective-C Client
  4. Troubleshoot Your Objective-C Client

Note: Learn about supported browsers, operating systems, and platform versions in the Release Notes.

To Display Logs for the Objective-C Client

  1. Build your Objective-C client, as described in Checklist: Build Objective-C (iOS) Clients Using Kaazing WebSocket Gateway.
  2. Add the following line into one of the existing functions, such as viewDidLoad():

    KGTracerDebug = YES;

    For example:

    - (void)viewDidLoad {
      [super viewDidLoad];
      KGTracerDebug = YES;
    }
    
  3. Build your Xcode project, run the Objective-C client in the Xcode Simulator, and perform some actions for the Objective-C client to log.

    The output is displayed in the Xcode Target Output area.

Notes

  • If you run the Objective-C client on an iOS device, the logging output is also displayed in Console for the device in Xcode Organizer. In Xcode, click Window, click Organizer, locate the iOS device in DEVICES, and click Console.
  • See KGTracer for more information.

Next Step

Troubleshoot Your Objective-C Client

TOP