I'm trying to get a receipt
from CCS, but I'm just not able to.
Here is what I'm doing:
I have a go
script:
package main
import (
"fmt"
"github.com/brunohenrique/go-gcm/ccs"
)
var (
user = struct {
gcmToken string
}{"mg0xe56LfjE:APA91bFHtHVQt85iNgyzTeDowovIGPAD_NbBjURppy1LgV9_oaM2R_9zn1fDXNuEeOoALTj7F8e8JmNPI3Md-CbbgTxdvxVrONFVfGz2dOujsaGkZjEhJcBH8sWvRNYZNIp2j2QliAEX"}
)
func main() {
con := connect()
// Sends a message
con.Send(&ccs.OutMsg{
To: user.gcmToken,
ID: "m-1366082849205",
Notification: map[string]interface{}{
"title": "Hey!",
"body": "There",
"sound": "default",
},
TimeToLive: 600,
DeliveryReceiptRequested: true,
DelayWhileIdle: true,
})
// Listen to messages
for {
m, err := con.Receive()
if err != nil {
fmt.Printf(">>> Err: %+v \n", err)
}
go func(m *ccs.InMsg) {
fmt.Printf(">>> InMsg: %+v \n", m)
}(m)
}
}
Everything seems alright when I run the script, but no receipt message back:
And this is what I'm doing when I get the notification:
Am I doing something wrong or missing something?
Thanks for trying out GCM on iOS. Unfortunately, delivery receipts are not available for display notifications on iOS at the moment.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With