Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Not receiving back a delivery_receipt_notification from GCM CCS

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:

enter image description here

And this is what I'm doing when I get the notification:

enter image description here

Am I doing something wrong or missing something?

like image 482
Rafael Garcia Avatar asked Jul 03 '15 19:07

Rafael Garcia


1 Answers

Thanks for trying out GCM on iOS. Unfortunately, delivery receipts are not available for display notifications on iOS at the moment.

like image 165
TheWonderBird Avatar answered Sep 21 '22 23:09

TheWonderBird