add(_:update:)

public func add<S: Sequence>(_ objects: S, update: Bool = false) where S.Iterator.Element: Object

Adds or updates all the objects in a collection into the Realm.

Warning

This method may only be called during a write transaction.

  • S

    Declaration

    Swift

    public func add<S: Sequence>(_ objects: S, update: Bool = false) where S.Iterator.Element: Object