mirror of
https://github.com/zhigang1992/react-native-notifications.git
synced 2026-06-11 08:13:28 +08:00
41 lines
2.4 KiB
Objective-C
41 lines
2.4 KiB
Objective-C
//
|
|
// NRNNManager.h
|
|
// NRNNOtifications
|
|
//
|
|
// Created by Muhammad Abed El Razek on 09/01/2019.
|
|
// Copyright © 2019 Wix. All rights reserved.
|
|
//
|
|
#import <UIKit/UIKit.h>
|
|
#import <Foundation/Foundation.h>
|
|
#import <UserNotifications/UserNotifications.h>
|
|
#import <PushKit/PushKit.h>
|
|
|
|
|
|
@protocol RNNRerouterDelegate <NSObject>
|
|
- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken;
|
|
- (void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error;
|
|
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler;
|
|
- (void)userNotificationCenter:(UNUserNotificationCenter *)center willPresentNotification:(UNNotification *)notification withCompletionHandler:(void (^)(UNNotificationPresentationOptions))completionHandler;
|
|
- (void)userNotificationCenter:(UNUserNotificationCenter *)center didReceiveNotificationResponse:(UNNotificationResponse *)response withCompletionHandler:(void (^)(void))completionHandler;
|
|
- (void)handlePushKitRegistered:(NSDictionary *)notification;
|
|
|
|
@end
|
|
|
|
@interface RNNRouter : NSObject<UNUserNotificationCenterDelegate>
|
|
|
|
+ (nonnull instancetype)sharedInstance;
|
|
|
|
@property (nonatomic, weak) id <RNNRerouterDelegate> _Nullable delegate;
|
|
|
|
- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken;
|
|
- (void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error;
|
|
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(nullable void (^)(UIBackgroundFetchResult))completionHandler;
|
|
- (void)didUpdatePushCredentials:(PKPushCredentials *)credentials forType:(NSString *)type;
|
|
- (void)pushRegistry:(PKPushRegistry *)registry didReceiveIncomingPushWithPayload:(PKPushPayload *)payload forType:(NSString *)type;
|
|
- (void)userNotificationCenter:(UNUserNotificationCenter *)center willPresentNotification:(UNNotification *)notification withCompletionHandler:(void (^)(UNNotificationPresentationOptions))completionHandler;
|
|
- (void)userNotificationCenter:(UNUserNotificationCenter *)center didReceiveNotificationResponse:(UNNotificationResponse *)response withCompletionHandler:(void (^)(void))completionHandler;
|
|
|
|
|
|
|
|
@end
|