FirebaseFirestore Framework Reference

BSONObjectId

class BSONObjectId : NSObject, NSCopying, @unchecked Sendable

Represents a BSON ObjectId type in Firestore documents.

  • The 24-character hex string representation of the ObjectId.

    Declaration

    Swift

    var value: String { get }
  • Creates a BSONObjectId constructed with the given value.

    Declaration

    Swift

    init(_ value: String)

    Parameters

    value

    The 24-character hex string representation of the ObjectId.

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

    Declaration

    Swift

    func isEqual(_ object: Any?) -> Bool