react-native-mipush icon indicating copy to clipboard operation
react-native-mipush copied to clipboard

iOS10推送前台不显示

Open ZionChang opened this issue 7 years ago • 0 comments

// 应用在前台收到通知
+ (void)userNotificationCenter:(UNUserNotificationCenter *)center willPresentNotification:(UNNotification *)notification withCompletionHandler:(void (^)(UNNotificationPresentationOptions))completionHandler {

    NSDictionary * userInfo = notification.request.content.userInfo;
    if([notification.request.trigger isKindOfClass:[UNPushNotificationTrigger class]]) {

        [RCTPushNotificationManager didReceiveRemoteNotification:userInfo];
    }
}

需要加上 completionHandler(UNNotificationPresentationOptionAlert | UNNotificationPresentationOptionBadge | UNNotificationPresentationOptionSound);

ZionChang avatar Jan 23 '18 08:01 ZionChang