diff --git a/ios/RNFIRMesssaging.m b/ios/RNFIRMesssaging.m index 993cb2d4e3d480a2171a6a3ec8786b263f06f1bb..5dcfe7792f5a1b2a82ef0d8478dcaae2d08ed27b 100644 --- a/ios/RNFIRMesssaging.m +++ b/ios/RNFIRMesssaging.m @@ -45,7 +45,12 @@ RCT_ENUM_CONVERTER(NSCalendarUnit, UNMutableNotificationContent *content = [UNMutableNotificationContent new]; content.title =[RCTConvert NSString:details[@"title"]]; content.body =[RCTConvert NSString:details[@"body"]]; - content.sound = [RCTConvert NSString:details[@"sound"]] ?: [UNNotificationSound defaultSound]; + NSString* sound = [RCTConvert NSString:details[@"sound"]]; + if(sound != nil){ + content.sound = [UNNotificationSound soundNamed:sound]; + }else{ + content.sound = [UNNotificationSound defaultSound]; + } content.categoryIdentifier = [RCTConvert NSString:details[@"click_action"]]; content.userInfo = details; content.badge = [RCTConvert NSNumber:details[@"badge"]];