2
0
mirror of synced 2025-01-10 22:26:02 +00:00

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
commit c9903706ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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){