Offline Log

Last Updated on : 2023-05-25 06:23:53

IPC SDK provides the ThingSmartLogger component that implements the output of SDK running logs. This helps you troubleshoot problems that arise during the integration with the IPC SDK. This topic describes how to integrate this component into your project.

  1. Add the following code block to the Podfile:

    pod 'ThingSmartLogger'
    
  2. Add the following code block to the file AppDelegate.m:

    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
    {
        // your other code
        [ThingSmartLogger startLog];
        // print log path
        NSLog(@"%@", [ThingSmartLogger logPath]);
        return YES;
    }
    
  3. (Recommended) Implement the output of offline logs for your app. You can share the logs as system files to facilitate troubleshooting.

    To ensure app information security, the offline log files are encrypted and cannot be viewed without decryption. To view the offline logs, export the log files and submit a ticket to request support.