Type-Definitions

The following type definitions are available globally.

  • @related FIRInstanceID

    The completion handler invoked when the InstanceID token returns. If the call fails we return the appropriate error code as described below.

    Declaration

    Swift

    typealias FIRInstanceIDTokenHandler = (String?, Error?) -> Void

    Objective-C

    typedef void (^FIRInstanceIDTokenHandler)(NSString *_Nullable,
                                              NSError *_Nullable)

    Parameters

    token

    The valid token as returned by InstanceID backend.

    error

    The error describing why generating a new token failed. See the error codes below for a more detailed description.

  • @related FIRInstanceID

    The completion handler invoked when the InstanceID deleteToken returns. If the call fails we return the appropriate error code as described below

    Declaration

    Swift

    typealias FIRInstanceIDDeleteTokenHandler = (Error?) -> Void

    Objective-C

    typedef void (^FIRInstanceIDDeleteTokenHandler)(NSError *_Nullable)

    Parameters

    error

    The error describing why deleting the token failed. See the error codes below for a more detailed description.

  • @related FIRInstanceID

    The completion handler invoked when the app identity is created. If the identity wasn’t created for some reason we return the appropriate error code.

    Declaration

    Swift

    typealias FIRInstanceIDHandler = (String?, Error?) -> Void

    Objective-C

    typedef void (^FIRInstanceIDHandler)(NSString *_Nullable, NSError *_Nullable)

    Parameters

    identity

    A valid identity for the app instance, nil if there was an error while creating an identity.

    error

    The error if fetching the identity fails else nil.

  • @related FIRInstanceID

    The completion handler invoked when the app identity and all the tokens associated with it are deleted. Returns a valid error object in case of failure else nil.

    Declaration

    Swift

    typealias FIRInstanceIDDeleteHandler = (Error?) -> Void

    Objective-C

    typedef void (^FIRInstanceIDDeleteHandler)(NSError *_Nullable)

    Parameters

    error

    The error if deleting the identity and all the tokens associated with it fails else nil.