回答

2

您需要的content_available參數發送到true

https://developers.google.com/cloud-messaging/http-server-ref

您還需要在自己的應用Info.plist文件添加remote-notificationsUIBackgroundModehttps://developer.apple.com/library/ios/documentation/General/Reference/InfoPlistKeyReference/Articles/iPhoneOSKeys.html#//apple_ref/doc/uid/TP40009252-SW22

+0

嗯,我只是需要不顯示通知來時。這真的是解決方案嗎? –

+0

@PanMluvčí,是的。你想要的是一個無聲的遠程通知,爲此你需要做這個答案中陳述的兩件事。 –

+0

好吧,我已經添加 遠程通知 我Info.plist文件 然後告訴我的隊友後端設置content_available .......仍然通知可見:-( –