fix for 'show_in_foreground' flag of local notification for iOS 10+

This commit is contained in:
Kevin
2017-11-16 15:45:29 +08:00
parent 1b6e4cbaad
commit 0577518578

View File

@@ -45,6 +45,10 @@ RCT_ENUM_CONVERTER(NSCalendarUnit,
content.userInfo = details;
content.badge = [RCTConvert NSNumber:details[@"badge"]];
if(details[@"show_in_foreground"]) {
[content setValue:@YES forKeyPath:@"shouldAlwaysAlertWhileAppIsForeground"];
}
NSDate *fireDate = [RCTConvert NSDate:details[@"fire_date"]];
if(fireDate == nil){