Allow local notification without sound for iOS.

parent dd2a0d5d
...@@ -45,9 +45,11 @@ RCT_ENUM_CONVERTER(NSCalendarUnit, ...@@ -45,9 +45,11 @@ RCT_ENUM_CONVERTER(NSCalendarUnit,
content.body =[RCTConvert NSString:details[@"body"]]; content.body =[RCTConvert NSString:details[@"body"]];
NSString* sound = [RCTConvert NSString:details[@"sound"]]; NSString* sound = [RCTConvert NSString:details[@"sound"]];
if(sound != nil){ if(sound != nil){
content.sound = [UNNotificationSound soundNamed:sound]; if ([sound isEqual:@"default"]) {
}else{ content.sound = [UNNotificationSound defaultSound];
content.sound = [UNNotificationSound defaultSound]; } else {
content.sound = [UNNotificationSound soundNamed:sound];
}
} }
content.categoryIdentifier = [RCTConvert NSString:details[@"click_action"]]; content.categoryIdentifier = [RCTConvert NSString:details[@"click_action"]];
content.userInfo = details; content.userInfo = details;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment