expo-notifications
Version: 
Provides an API to fetch push notification tokens and to present, schedule, receive, and respond to notifications.
18 lines (14 loc) • 501 B
text/typescript
import { Platform } from 'expo-modules-core';
import { PushTokenManagerModule } from './PushTokenManager.types';
let warningHasBeenShown = false;
export default {
  addListener: () => {
    if (!warningHasBeenShown) {
      console.warn(
        `[expo-notifications] Listening to push token changes is not yet fully supported on ${Platform.OS}. Adding a listener will have no effect.`
      );
      warningHasBeenShown = true;
    }
  },
  removeListeners: () => {},
} as PushTokenManagerModule;