swift - Google Cloud Messaging iOS, receiving multiple notifications -


i've implemented google cloud messaging ios succesfully , i'm sending following http format server:

$jsondata = array(     'to' => '/topics/' . $data['abbreviation'],     'notification' => array(         'body' => $data['body'],         'title' => $data['title']     ) ); 

the data sent succesfully , ios application showing notification. it's showing 2 5 times , i'm sure server sending once because i'm sending same format android gets 1 notification instead of multiple.

am forgetting something? appdelegate following:

func application( application: uiapplication,     didreceiveremotenotification userinfo: [nsobject : anyobject],     fetchcompletionhandler handler: (uibackgroundfetchresult) -> void) {     // works if app started gcm service     gcmservice.sharedinstance().appdidreceivemessage(userinfo);      handler(uibackgroundfetchresult.nodata)     // invoke completion handler passing appropriate uibackgroundfetchresult value } 

does google cloud messaging send notification multiple times apple apns or else?

it seems occur after uninstall.

google recognized bug on side github.com/google/gcm/issues/101


Comments

Popular posts from this blog

php - Invalid Cofiguration - yii\base\InvalidConfigException - Yii2 -

How to show in django cms breadcrumbs full path? -

ruby on rails - npm error: tunneling socket could not be established, cause=connect ETIMEDOUT -