解决点击通知导致app崩溃问题

解决点击通知导致app崩溃问题 报[__NSPlaceholderDictionary initWithObjects:forKeys:count:]
This commit is contained in:
Mak 2018-04-12 09:20:18 +08:00 committed by GitHub
parent 6c80b47bad
commit 8bad630e5a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -158,10 +158,10 @@ NSDictionary *_launchOptions;
userInfo = [self jpushFormatAPNSDic:notification.request.content.userInfo]; userInfo = [self jpushFormatAPNSDic:notification.request.content.userInfo];
} else { } else {
UNNotificationContent *content = notification.request.content; UNNotificationContent *content = notification.request.content;
userInfo = [NSMutableDictionary dictionaryWithDictionary:@{@"content": content.body, userInfo = [NSMutableDictionary dictionaryWithObjectsAndKeys:content.body,@"content",
@"badge": content.badge, content.badge,@"badge",
@"extras": content.userInfo content.userInfo,@"extras",
}]; nil];
userInfo[@"identifier"] = notification.request.identifier; userInfo[@"identifier"] = notification.request.identifier;
} }