Skip to content

Commit

Permalink
Merge pull request #352 from SgtMadmonkey/development
Browse files Browse the repository at this point in the history
Fix/Ios notifications not playing sound
  • Loading branch information
TobiasBuchholz authored Nov 9, 2024
2 parents b51ffc3 + c16675e commit c66462a
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,16 @@ public void WillPresentNotification(UNUserNotificationCenter center, UNNotificat
{
var fcmNotification = notification.ToFCMNotification();
OnNotificationReceived(fcmNotification);

if(!fcmNotification.IsSilentInForeground) {
completionHandler(UNNotificationPresentationOptions.Alert);
if(OperatingSystem.IsIOSVersionAtLeast(14)) {
completionHandler(UNNotificationPresentationOptions.Banner
| UNNotificationPresentationOptions.List
| UNNotificationPresentationOptions.Sound);

} else {
completionHandler(UNNotificationPresentationOptions.Alert
| UNNotificationPresentationOptions.Sound);
}
}
}

Expand Down

0 comments on commit c66462a

Please sign in to comment.