Type-Definitions

The following type definitions are available globally.

  • The completion handler invoked once the data connection with FIRMessaging is established. The data connection is used to send a continous stream of data and all the FIRMessaging data notifications arrive through this connection. Once the connection is established we invoke the callback with nil error. Correspondingly if we get an error while trying to establish a connection we invoke the handler with an appropriate error object and do an exponential backoff to try and connect again unless successful.

    Declaration

    Swift

    typealias FIRMessagingConnectCompletion = (Error?) -> Void

    Objective-C

    typedef void (^FIRMessagingConnectCompletion)(NSError *_Nullable)

    Parameters

    error

    The error object if any describing why the data connection to FIRMessaging failed.