Merge pull request #740 from hisokakei/ios-foreground-notif

Enable foreground notification on ios
This commit is contained in:
Michael Diarmid
2018-01-17 15:08:07 +00:00
committed by GitHub

View File

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