Allow local notification without sound for iOS.

parent dd2a0d5d
......@@ -45,9 +45,11 @@ RCT_ENUM_CONVERTER(NSCalendarUnit,
content.body =[RCTConvert NSString:details[@"body"]];
NSString* sound = [RCTConvert NSString:details[@"sound"]];
if(sound != nil){
content.sound = [UNNotificationSound soundNamed:sound];
}else{
if ([sound isEqual:@"default"]) {
content.sound = [UNNotificationSound defaultSound];
} else {
content.sound = [UNNotificationSound soundNamed:sound];
}
}
content.categoryIdentifier = [RCTConvert NSString:details[@"click_action"]];
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