Skip to content

Commit f0e5f1d

Browse files
authored
Merge pull request #757 from Codelisk/feature/critical_sound
Added possibility to use a critical sound
2 parents 6b15205 + 9c1a1c1 commit f0e5f1d

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/Shiny.Notifications/Platforms/iOS/NotificationManager.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,14 @@ protected virtual async Task ApplyChannel(Notification notification, UNMutableNo
266266
native.CategoryIdentifier = channel.Identifier;
267267
if (!channel.CustomSoundPath.IsEmpty())
268268
{
269-
native.Sound = UNNotificationSound.GetSound(channel.CustomSoundPath);
269+
if (channel.Importance == ChannelImportance.Critical)
270+
{
271+
native.Sound = UNNotificationSound.GetCriticalSound(channel.CustomSoundPath);
272+
}
273+
else
274+
{
275+
native.Sound = UNNotificationSound.GetSound(channel.CustomSoundPath);
276+
}
270277
}
271278
else
272279
{

0 commit comments

Comments
 (0)