RNNotifications.h 1.2 KB
Newer Older
Lidan Hifi's avatar
Lidan Hifi committed
1 2
@import UIKit;

3
#import <React/RCTBridgeModule.h>
4
#import <PushKit/PushKit.h>
yogevbd's avatar
WIP  
yogevbd committed
5
@import UserNotifications;
Lidan Hifi's avatar
Lidan Hifi committed
6

7 8
@interface RNNotifications : NSObject <RCTBridgeModule>

yogevbd's avatar
WIP  
yogevbd committed
9
+ (instancetype)sharedInstance;
10

yogevbd's avatar
WIP  
yogevbd committed
11 12
- (void)requestPermissionsWithCategories:(NSMutableSet *)categories;
- (void)registerPushKit;
13

yogevbd's avatar
WIP  
yogevbd committed
14 15 16 17 18 19 20 21 22 23 24 25
- (void)didRegisterForRemoteNotificationsWithDeviceToken:(id)deviceToken;
- (void)didFailToRegisterForRemoteNotificationsWithError:(NSError *)error;
- (void)didUpdatePushCredentials:(PKPushCredentials *)credentials forType:(NSString *)type;

//- (void)didReceiveRemoteNotification:(NSDictionary *)notification;

- (void)handleActionWithIdentifier:(NSString *)identifier forRemoteNotification:(NSDictionary *)userInfo withResponseInfo:(NSDictionary *)responseInfo completionHandler:(void (^)())completionHandler;
- (void)handleActionWithIdentifier:(NSString *)identifier forLocalNotification:(UILocalNotification *)notification withResponseInfo:(NSDictionary *)responseInfo completionHandler:(void (^)())completionHandler;

- (void)didReceiveForegroundNotification:(UNNotification *)notification;
- (void)didReceiveNotificationResponse:(UNNotificationResponse *)response;
//- (void)setBadgeForNotification:(NSDictionary *)notification;
Lidan Hifi's avatar
Lidan Hifi committed
26

Lidan Hifi's avatar
Lidan Hifi committed
27
@end