Open Bad-Listener opened 3 years ago
+1
+1 iPhone 5S
Set 'sound' when sending a message
@showtan001 where need to add this 'sound'? could you explain please?
I am using firebase_admin in python3. Here is an example of how to send an ios notification with a sound
from firebase_admin import credentials, messaging
firebase_admin.initialize_app(credential=cred, name=app) message = messaging.Message( notification=messaging.Notification( title=title, body=message, ), android=messaging.AndroidConfig( notification=messaging.AndroidNotification( channel_id=CHANEL_ID.get(service) ) ), apns=messaging.APNSConfig( payload=messaging.APNSPayload( aps=messaging.Aps( sound=messaging.CriticalSound( name='default' ) ) ) ), data=data, token=token, ) firebase_response = messaging.send(message, app=firebase_admin.get_app(app))
Hello all!
I have setup the package, following all instructions. I am coming here from react-native-push-notifcation (everything was working perfectly but had to update and use this package for iOS), and just started using this module for iOS notifications
I can receive notifications in every app state (foreground, background, app closed) and act on them perfectly.
The only thing that does not happen is vibration or sound when the notification comes in device...
I double checked that I followed every instruction. I am referring to remote notifications from Firebase.
Please help!