解决点击通知导致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];
} else {
UNNotificationContent *content = notification.request.content;
userInfo = [NSMutableDictionary dictionaryWithDictionary:@{@"content": content.body,
@"badge": content.badge,
@"extras": content.userInfo
}];
userInfo = [NSMutableDictionary dictionaryWithObjectsAndKeys:content.body,@"content",
content.badge,@"badge",
content.userInfo,@"extras",
nil];
userInfo[@"identifier"] = notification.request.identifier;
}