RCTPushNotificationManager.h 1003 B

12345678910111213141516171819202122232425
  1. /*
  2. * Copyright (c) Facebook, Inc. and its affiliates.
  3. *
  4. * This source code is licensed under the MIT license found in the
  5. * LICENSE file in the root directory of this source tree.
  6. */
  7. #import <React/RCTEventEmitter.h>
  8. extern NSString *const RCTRemoteNotificationReceived;
  9. @interface RCTPushNotificationManager : RCTEventEmitter
  10. typedef void (^RCTRemoteNotificationCallback)(UIBackgroundFetchResult result);
  11. #if !TARGET_OS_TV && !TARGET_OS_UIKITFORMAC
  12. + (void)didRegisterUserNotificationSettings:(UIUserNotificationSettings *)notificationSettings;
  13. + (void)didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken;
  14. + (void)didReceiveRemoteNotification:(NSDictionary *)notification;
  15. + (void)didReceiveRemoteNotification:(NSDictionary *)notification fetchCompletionHandler:(RCTRemoteNotificationCallback)completionHandler;
  16. + (void)didReceiveLocalNotification:(UILocalNotification *)notification;
  17. + (void)didFailToRegisterForRemoteNotificationsWithError:(NSError *)error;
  18. #endif
  19. @end