Teardown

Notifications

Optional push notification support via Expo, Firebase, or Wix.

A notification adapter is optional. Add one only if you want the SDK to manage push tokens and notification permissions. Pass it as notificationAdapter.

Expo

npx expo install expo-notifications
import { ExpoNotificationsAdapter } from "@teardown/force-updates/expo";

new TeardownCore({
  // ...
  notificationAdapter: new ExpoNotificationsAdapter(),
});

Firebase

For apps using React Native Firebase.

npm install @react-native-firebase/messaging
import { FirebaseMessagingAdapter } from "@teardown/force-updates/firebase";

new TeardownCore({
  // ...
  notificationAdapter: new FirebaseMessagingAdapter(),
});

Wix

For apps using react-native-notifications.

npm install react-native-notifications
import { WixNotificationsAdapter } from "@teardown/force-updates/wix";

new TeardownCore({
  // ...
  notificationAdapter: new WixNotificationsAdapter(),
});

When a notification adapter is set, teardown.notifications becomes available for requesting permissions and reading the push token. See the API Reference.

On this page