We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello.
I'm having issues getting sound for the notifciations sent to IOS Devices. The devices receives the notification but without sound.
func buildIOSMessage() *messaging.Message { tokenDecrypted, err := decrypt(iosToken) if err != nil { log.Fatal("fatal decrypt") } // Prepare IOS message message := &messaging.Message{ Token: tokenDecrypted, Notification: &messaging.Notification{ Title: "whatever", Body: "body" }, APNS: &messaging.APNSConfig{ Headers: map[string]string{ "apns-priority": "10", // High priority }, Payload: &messaging.APNSPayload{ Aps: &messaging.Aps{ Alert: &messaging.ApsAlert{ Title: "whatever" Body: "body" }, Sound: "default", }, CustomData: map[string]interface{}{ "extra_super_data": "whatever", }, }, }, } return message } client, err := app.Messaging(ctx) res, err := client.Send(ctx, message) if err != nil { log.Fatalf("Failed to sent message: %v", err) } log.Println(res) log.Println("Firebase messaging client created successfully")
However, if I sent it through Firebase console, it works. If we compare the payload received in both cases:
{ "gcm.message_id": "whatever", "google.c.a.e": "1", "google.c.sender.id": "whatever", "aps": { "alert": { "title": "quefacemos", "body": "SONIDOSONIDOSONIDO" } }, "google.c.fid": "whatever", "extra_super_data": "whatever" }
{ "google.c.a.c_l": "Test sound", "google.c.a.c_id": "whatver", "google.c.sender.id": "whatever", "google.c.a.ts": "whatv", "gcm.n.e": "1", "gcm.message_id": "whatever", "google.c.a.e": "1", "google.c.fid": "whatever", "aps": { "alert": "Test sound", "sound": "default", "mutable-content": 1 }, "google.c.a.udt": "0", "gcm.notification.sound2": "default" }
Anyone could help me? Thanks
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hello.
I'm having issues getting sound for the notifciations sent to IOS Devices. The devices receives the notification but without sound.
However, if I sent it through Firebase console, it works. If we compare the payload received in both cases:
Anyone could help me? Thanks
The text was updated successfully, but these errors were encountered: