Last Updated on : 2023-05-22 06:38:32
IPC SDK provides the TuyaSmartLogger
component that implements the output of running logs to a local file. This helps you troubleshoot problems that arise during the integration with the IPC SDK. This topic describes how to integrate with this component.
Add the following code block to the Podfile:
pod 'TuyaSmartLogger'
Add the following code block to the file AppDelegate.m
:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
// your other code
[TuyaSmartLogger startLog];
// print log path
NSLog(@"%@", [TuyaSmartLogger getDebugLogPath]);
return YES;
}
Run your app, go to the sandbox, and then find the log file in the path printed in Step 2.
If you use a real device for debugging, export the sandbox file of your app in Xcode, as depicted in the following figure.
Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback