enablePush

Enables push messaging in the MobilePush SDK.

Syntax

MCReactModule.enablePush();

Returns

  • void - No return value.

Example

import { MCReactModule } from "react-native-marketingcloudsdk";

const enablePushNotifications = () => {
  try {
    MCReactModule.enablePush();
    console.log("Push notifications enabled");
  } catch (error) {
    console.error("Error enabling push:", error);
  }
};

See Also