Constants

The following constants are available globally.

  • Notification sent when the upstream message has been delivered successfully to the server. The notification object will be the messageID of the successfully delivered message.

    Declaration

    Swift

    let MessagingSendSuccessNotification: String

    Objective-C

    extern NSString *const _Nonnull FIRMessagingSendSuccessNotification
  • Notification sent when the upstream message was failed to be sent to the server. The notification object will be the messageID of the failed message. The userInfo dictionary will contain the relevant error information for the failure.

    Declaration

    Swift

    let MessagingSendErrorNotification: String

    Objective-C

    extern NSString *const _Nonnull FIRMessagingSendErrorNotification
  • Notification sent when the Firebase messaging 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 server.

    Declaration

    Swift

    let MessagingMessagesDeletedNotification: String

    Objective-C

    extern NSString *const _Nonnull FIRMessagingMessagesDeletedNotification
  • Notification sent when Firebase Messaging establishes or disconnects from an FCM socket connection. You can query the connection state in this notification by checking the isDirectChannelEstablished property of FIRMessaging.

    Declaration

    Swift

    let MessagingConnectionStateChangedNotification: String

    Objective-C

    extern NSString *const _Nonnull FIRMessagingConnectionStateChangedNotification
  • Notification sent when the FCM registration token has been refreshed. You can also receive the FCM token via the FIRMessagingDelegate method -messaging:didRefreshRegistrationToken:

    Declaration

    Swift

    let MessagingRegistrationTokenRefreshedNotification: String

    Objective-C

    extern NSString
        *const _Nonnull FIRMessagingRegistrationTokenRefreshedNotification