fix iOS10 remove local notification fail bug

This commit is contained in:
huangminlinux 2017-10-20 11:28:51 +08:00
parent 8811dfc002
commit 07c9b2b945
2 changed files with 558 additions and 507 deletions

View File

@ -155,7 +155,12 @@ NSDictionary *_launchOptions;
}
- (void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification {
[[NSNotificationCenter defaultCenter] postNotificationName:JPushDocumentEvent_ReceiveLocalNotification object:notification.userInfo];
NSDictionary* localNotificationEvent = @{@"content":notification.alertBody,
@"badge": @(notification.applicationIconBadgeNumber),
@"extras":notification.userInfo,
};
[[NSNotificationCenter defaultCenter] postNotificationName:JPushDocumentEvent_ReceiveLocalNotification object:localNotificationEvent];
}
- (void)applicationWillEnterForeground:(UIApplication *)application {

File diff suppressed because it is too large Load Diff