Firebase Cloud Messaging (FCM) is the new version of GCM. It inherits the reliable and scalable GCM infrastructure, plus new features! See the FAQ to learn more. If you are integrating messaging in a new app, start with FCM. GCM users are strongly recommended to upgrade to FCM, in order to benefit from new FCM features today and in the future. Before you go, please visit our GCM and FCM developer survey to give us feedback!

<GCMReceiverDelegate> Protocol

<GCMReceiverDelegate> Protocol Reference

Overview

Delegate for receiving status of upstream messages sent via Google Cloud Messaging.

Inherits <NSObject>.

Instance Method Summary

(void) - willSendDataMessageWithID:error:
 The callback is invoked once GCM processes the message. More...
 
(void) - didSendDataMessageWithID:
 This callback is invoked if GCM successfully sent the message upstream and the message was successfully received. More...
 
(void) - didDeleteMessagesOnServer
 Called when the GCM server deletes pending messages due to exceeded storage limits. More...
 

Method Detail

- (void) willSendDataMessageWithID: (NSString *)  messageID
error: (NSError *)  error 
optional

The callback is invoked once GCM processes the message.

If processing fails, the callback is invoked with a valid error object representing the error. Otherwise, the message is ready to be sent.

Parameters
messageIDThe messageID for the message that failed to be sent upstream.
errorThe error describing why the send operation failed.
- (void) didSendDataMessageWithID: (NSString *)  messageID
optional

This callback is invoked if GCM successfully sent the message upstream and the message was successfully received.

Parameters
messageIDThe messageID for the message sent.
- (void) didDeleteMessagesOnServer
optional

Called when the GCM server deletes pending messages due to exceeded storage limits.

This may occur, for example, when the device cannot be reached for an extended period of time.

It is recommended to retrieve any missing messages directly from the app server.

Send feedback about...

Cloud Messaging
Cloud Messaging