mirror of
https://github.com/jpush/jpush-phonegap-plugin.git
synced 2026-04-19 00:03:45 +08:00
iOS - add APIs & doc
1.增加 API - addDismissActions 2.增加 API - addNotificationActions 3.增加封装类 NotificationService 4.更新对应文档
This commit is contained in:
@@ -79,9 +79,12 @@
|
||||
|
||||
-(void)jpushNotificationCenter:(UNUserNotificationCenter *)center didReceiveNotificationResponse:(UNNotificationResponse *)response withCompletionHandler:(void (^)())completionHandler{
|
||||
NSMutableDictionary *userInfo = [NSMutableDictionary dictionaryWithDictionary:response.notification.request.content.userInfo];
|
||||
@try {
|
||||
[userInfo setValue:[response valueForKey:@"userText"] forKey:@"userText"];
|
||||
} @catch (NSException *exception) { }
|
||||
[userInfo setValue:response.actionIdentifier forKey:@"actionIdentifier"];
|
||||
[userInfo setValue:kJPushPluginiOS10ClickNotification forKey:@"JPushNotificationType"];
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:kJPushPluginiOS10ClickNotification object:userInfo];
|
||||
|
||||
completionHandler();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user