✨ iOS push notification custom sound
This commit is contained in:
@@ -53,8 +53,10 @@ class NotificationService: UNNotificationServiceExtension {
|
||||
private func processNotification(request: UNNotificationRequest, content: UNMutableNotificationContent) throws {
|
||||
switch content.userInfo["type"] as? String {
|
||||
case "messages.new":
|
||||
content.sound = UNNotificationSound(named: UNNotificationSoundName("SfxMessage.caf"))
|
||||
try handleMessagingNotification(request: request, content: content)
|
||||
default:
|
||||
content.sound = UNNotificationSound(named: UNNotificationSoundName("SfxNotification.caf"))
|
||||
try handleDefaultNotification(content: content)
|
||||
}
|
||||
}
|
||||
|
||||
BIN
ios/SolianNotificationService/SfxMessage.caf
Normal file
BIN
ios/SolianNotificationService/SfxMessage.caf
Normal file
Binary file not shown.
BIN
ios/SolianNotificationService/SfxNotification.caf
Normal file
BIN
ios/SolianNotificationService/SfxNotification.caf
Normal file
Binary file not shown.
Reference in New Issue
Block a user