UNPKG

react-native-firebase-compiled

Version:

A well tested, feature rich Firebase implementation for React Native, supporting iOS & Android. Individual module support for Admob, Analytics, Auth, Crash Reporting, Cloud Firestore, Database, Dynamic Links, Functions, Messaging (FCM), Remote Config, Sto

32 lines (24 loc) 882 B
import { getNativeModule } from '../../utils/native'; import type Notifications from '.'; export type BackgroundFetchResultValue = string; type BackgroundFetchResult = { noData: BackgroundFetchResultValue, newData: BackgroundFetchResultValue, failure: BackgroundFetchResultValue, }; export default class IOSNotifications { _backgroundFetchResult: BackgroundFetchResult; shouldAutoComplete: boolean; constructor(notifications: Notifications) { this.shouldAutoComplete = true; const nativeModule = getNativeModule(notifications); this._backgroundFetchResult = { noData: nativeModule.backgroundFetchResultNoData, newData: nativeModule.backgroundFetchResultNewData, failure: nativeModule.backgroundFetchResultFailure, }; } get backgroundFetchResult(): BackgroundFetchResult { return { ...this._backgroundFetchResult }; } }