Type-Definitions

The following type definitions are available globally.

  • NSString typedef representing a task listener handle.

    Declaration

    Swift

    typealias FIRStorageHandle = NSString

    Objective-C

    typedef NSString *FIRStorageHandle
  • Block typedef typically used when downloading data. - parameter: data The data returned by the download, or nil if no data available or download failed. - parameter: error The error describing failure, if one occurred.

    Declaration

    Swift

    typealias FIRStorageVoidDataError = (Data?, Error?) -> Void

    Objective-C

    typedef void (^FIRStorageVoidDataError)(NSData *_Nullable, NSError *_Nullable)

    Parameters

    data

    The data returned by the download, or nil if no data available or download failed.

    error

    The error describing failure, if one occurred.

  • Block typedef typically used when performing binary async operations such as delete, where the operation either succeeds without an error or fails with an error. - parameter: error The error describing failure, if one occurred.

    Declaration

    Swift

    typealias FIRStorageVoidError = (Error?) -> Void

    Objective-C

    typedef void (^FIRStorageVoidError)(NSError *_Nullable)

    Parameters

    error

    The error describing failure, if one occurred.

  • Block typedef typically used when retrieving metadata. - parameter: metadata The metadata returned by the operation, if metadata exists.

    Declaration

    Swift

    typealias FIRStorageVoidMetadata = (FIRStorageMetadata?) -> Void

    Objective-C

    typedef void (^FIRStorageVoidMetadata)(FIRStorageMetadata *_Nullable)

    Parameters

    metadata

    The metadata returned by the operation, if metadata exists.

  • Block typedef typically used when retrieving metadata with the possibility of an error. - parameter: metadata The metadata returned by the operation, if metadata exists. - parameter: error The error describing failure, if one occurred.

    Declaration

    Swift

    typealias FIRStorageVoidMetadataError = (FIRStorageMetadata?, Error?) -> Void

    Objective-C

    typedef void (^FIRStorageVoidMetadataError)(FIRStorageMetadata *_Nullable,
                                                NSError *_Nullable)

    Parameters

    metadata

    The metadata returned by the operation, if metadata exists.

    error

    The error describing failure, if one occurred.

  • Block typedef typically used to asynchronously return a storage task snapshot. - parameter: snapshot The returned task snapshot.

    Declaration

    Swift

    typealias FIRStorageVoidSnapshot = (FIRStorageTaskSnapshot) -> Void

    Objective-C

    typedef void (^FIRStorageVoidSnapshot)(FIRStorageTaskSnapshot *_Nonnull)

    Parameters

    snapshot

    The returned task snapshot.

  • Block typedef typically used when retrieving a download URL. - parameter: URL The download URL associated with the operation. - parameter: error The error describing failure, if one occurred.

    Declaration

    Swift

    typealias FIRStorageVoidURLError = (URL?, Error?) -> Void

    Objective-C

    typedef void (^FIRStorageVoidURLError)(NSURL *_Nullable, NSError *_Nullable)

    Parameters

    URL

    The download URL associated with the operation.

    error

    The error describing failure, if one occurred.