From b77c0b14ad152276f0c61c8c5891944a0f145300 Mon Sep 17 00:00:00 2001 From: haipengz Date: Thu, 24 Jan 2019 16:16:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=EF=BC=9AiOS=E4=BD=8E?= =?UTF-8?q?=E7=89=88=E6=9C=AC=E4=B8=8B=E7=82=B9=E5=87=BB=E6=8E=A8=E9=80=81?= =?UTF-8?q?=E9=97=AA=E9=80=80=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit NSDate未分配内存就初始化对象导致容错性差的低版本iOS闪退问题 --- ios/RCTAliyunPush/AliyunPushManager.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ios/RCTAliyunPush/AliyunPushManager.m b/ios/RCTAliyunPush/AliyunPushManager.m index d725a06..5b699e6 100644 --- a/ios/RCTAliyunPush/AliyunPushManager.m +++ b/ios/RCTAliyunPush/AliyunPushManager.m @@ -575,8 +575,8 @@ - (void)application:(UIApplication *)application didReceiveRemoteNotification:(N NSMutableDictionary *notificationDict = [NSMutableDictionary dictionary]; - // 通知时间 - notificationDict[@"date"] = [NSDate init]; + // 通知时间,修复:iOS低版本下点击推送闪退的问题(未分配内存就初始化对象) + notificationDict[@"date"] = [[NSDate alloc] init]; // 标题 notificationDict[@"title"] = @"";