react-native-firebase/ios/RNFirebase/RNFirebaseMessaging.h

43 lines
1.5 KiB
C
Raw Normal View History

2017-03-09 15:26:28 +00:00
#ifndef RNFirebaseMessaging_h
#define RNFirebaseMessaging_h
#endif
#import <UIKit/UIKit.h>
2017-03-09 15:26:28 +00:00
#import "Firebase.h"
#if __has_include(<React/RCTEventEmitter.h>)
#import <React/RCTEventEmitter.h>
#else // Compatibility for RN version < 0.40
2017-03-09 15:26:28 +00:00
#import "RCTEventEmitter.h"
#endif
#if __has_include(<React/RCTBridgeModule.h>)
#import <React/RCTBridgeModule.h>
#else // Compatibility for RN version < 0.40
2017-03-09 15:26:28 +00:00
#import "RCTBridgeModule.h"
#endif
#if __has_include(<React/RCTUtils.h>)
#import <React/RCTUtils.h>
#else // Compatibility for RN version < 0.40
2017-03-09 15:26:28 +00:00
#import "RCTUtils.h"
#endif
2017-03-09 15:26:28 +00:00
@import UserNotifications;
2017-03-09 15:26:28 +00:00
@interface RNFirebaseMessaging : NSObject <RCTBridgeModule>
2017-03-09 15:26:28 +00:00
typedef void (^RCTRemoteNotificationCallback)(UIBackgroundFetchResult result);
typedef void (^RCTWillPresentNotificationCallback)(UNNotificationPresentationOptions result);
typedef void (^RCTNotificationResponseCallback)();
2017-03-09 15:26:28 +00:00
@property (nonatomic, assign) bool connectedToFCM;
2017-03-09 15:26:28 +00:00
#if !TARGET_OS_TV
+ (void)didReceiveRemoteNotification:(nonnull NSDictionary *)userInfo fetchCompletionHandler:(nonnull RCTRemoteNotificationCallback)completionHandler;
+ (void)didReceiveLocalNotification:(nonnull UILocalNotification *)notification;
+ (void)didReceiveNotificationResponse:(nonnull UNNotificationResponse *)response withCompletionHandler:(nonnull RCTNotificationResponseCallback)completionHandler;
+ (void)willPresentNotification:(nonnull UNNotification *)notification withCompletionHandler:(nonnull RCTWillPresentNotificationCallback)completionHandler;
2017-03-09 15:26:28 +00:00
#endif
@end