logSdkState

Instructs the native SDK to log the SDK state to the native logging system (Logcat for Android and Xcode or Console for iOS). The Engagement Support team requests for the SDK state logs during support calls as they can help diagnose most issues.

Syntax 

1MCReactModule.logSdkState();

Returns 

  • void - No return value.

Example 

1import { MCReactModule } from "react-native-marketingcloudsdk";
2
3const logCurrentSDKState = () => {
4  try {
5    MCReactModule.logSdkState();
6    console.log("SDK state logged to native logging system");
7  } catch (error) {
8    console.error("Error logging SDK state:", error);
9  }
10};

See Also 

Related Methods