FirebaseFirestore Framework Reference

FIRBlob


@interface FIRBlob : NSObject <NSCopying>

Represents a binary blob or BSON binary data in Firestore documents.

  • An 8-bit unsigned integer denoting the subtype of the data. Returns 0 for standard Blobs.

    Declaration

    Objective-C

    @property (nonatomic, readonly) uint8_t subtype;
  • The binary data.

    Declaration

    Objective-C

    @property (nonatomic, copy, readonly) NSData *_Nonnull bytes;
  • Creates a standard Blob with the given data.

    Declaration

    Objective-C

    + (nonnull instancetype)blobWithBytes:(nonnull NSData *)bytes;

    Parameters

    bytes

    The binary data.

  • Creates a BSON Binary type Blob with subtype 0.

    Declaration

    Objective-C

    + (nonnull instancetype)blobWithBSONBinary:(nonnull NSData *)bytes;

    Parameters

    bytes

    The binary data.

  • Creates a BSON Binary type Blob with the specified subtype.

    Declaration

    Objective-C

    + (nonnull instancetype)blobWithBSONBinary:(nonnull NSData *)bytes
                                       subtype:(uint8_t)subtype;

    Parameters

    bytes

    The binary data.

    subtype

    An 8-bit unsigned integer denoting the subtype of the data (must be [0, 255]).

  • Returns true if the given object is equal to this, and false otherwise.

    Declaration

    Objective-C

    - (BOOL)isEqual:(nullable id)object;
  • Compares this Blob to another Blob.

    Declaration

    Objective-C

    - (NSComparisonResult)compare:(nonnull FIRBlob *)other;