HyphenateChatSDK  4.6.0
EMLocalNotificationManager.h
1 //
2 // EMLocalNotificationManager.h
3 // LocalNotification
4 //
5 // Created by lixiaoming on 2021/8/24.
6 //
7 
8 #import <Foundation/Foundation.h>
9 #import <UserNotifications/UserNotifications.h>
10 
11 NS_ASSUME_NONNULL_BEGIN
12 
13 typedef NS_ENUM(NSInteger, EMNotificationState) {
14  EMWillPresentNotification = 0,
15  EMDidReceiveNotificationResponse
16  };
17 
25 @protocol EMLocalNotificationDelegate <NSObject>
26 @optional
39 - (void)emuserNotificationCenter:(UNUserNotificationCenter *)center willPresentNotification:(UNNotification *)notification withCompletionHandler:(void (^)(UNNotificationPresentationOptions options))completionHandler;
51 - (void)emuserNotificationCenter:(UNUserNotificationCenter *)center didReceiveNotificationResponse:(UNNotificationResponse *)response withCompletionHandler:(void(^)(void))completionHandler;
61 - (void)emuserNotificationCenter:(UNUserNotificationCenter *)center openSettingsForNotification:(UNNotification *)notification;
62 
72 - (void)emGetNotificationMessage:(UNNotification*)notification state:(EMNotificationState)state;
73 
83 - (void)emHandleNotificationContent:(UNMutableNotificationContent*)content;
84 
94 - (void)emDidRecivePushSilentMessage:(NSDictionary *)messageDic;
95 
96 @end
97 
105 @interface EMLocalNotificationManager : NSObject
114 +(instancetype _Nonnull ) alloc __attribute__((unavailable("call sharedManager instead")));
123 +(instancetype _Nonnull ) new __attribute__((unavailable("call sharedManager instead")));
132 -(instancetype _Nonnull ) copy __attribute__((unavailable("call sharedManager instead")));
141 -(instancetype _Nonnull ) mutableCopy __attribute__((unavailable("call sharedManager instead")));
150 + (instancetype _Nonnull )sharedManager;
151 
165 - (void)launchWithDelegate:(id<EMLocalNotificationDelegate>)aDelegate;
166 
178 - (void)userNotificationCenter:(UNUserNotificationCenter *)center willPresentNotification:(UNNotification *)notification withCompletionHandler:(void (^)(UNNotificationPresentationOptions options))completionHandler;
190 - (void)userNotificationCenter:(UNUserNotificationCenter *)center didReceiveNotificationResponse:(UNNotificationResponse *)response withCompletionHandler:(void(^)(void))completionHandler;
191 @end
192 
193 NS_ASSUME_NONNULL_END
Definition: EMLocalNotificationManager.h:25
Definition: EMLocalNotificationManager.h:105
instancetype _Nonnull sharedManager()
(unavailable("call sharedManager instead" __attribute__()