Answer the question
In order to leave comments, you need to log in
How to send push with sound on IOS?
There is an application written for android and ios in react native.
Notifications are set up via Firebase (react-native-firebase).
Notifications come, but there is no sound on IOS, there is sound on android.
When sending, added options for apns -> payload -> aps : "sound" => "default"
If you look at the permission settings for this application on the phone, then there is no switch in notifications - sounds that other applications have.
Tell me where to look for the error? Do I need to somehow request the rights to notifications with sound or something else?
Answer the question
In order to leave comments, you need to log in
Yes, permission to sound in push notifications must be requested explicitly. Only after that such an item will appear in the settings and, in fact, sounds will start playing.
Notice the element .sound
inside the array passed to options
:
let center = UNUserNotificationCenter.current()
center.requestAuthorization(options: [.alert, .sound, .badge]) { granted, error in
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question