enablePush

Enables push messaging in the MobilePush SDK.

Syntax 

1MCReactModule.enablePush();

Returns 

  • void - No return value.

Example 

1import { MCReactModule } from "react-native-marketingcloudsdk";
2
3const enablePushNotifications = () => {
4  try {
5    MCReactModule.enablePush();
6    console.log("Push notifications enabled");
7  } catch (error) {
8    console.error("Error enabling push:", error);
9  }
10};

See Also 

Related Methods