Contents

save(_:span:commit:)

Saves an event or recurring events to the event store by either committing or batching the changes.

Declaration

func save(_ event: EKEvent, span: EKSpan, commit: Bool) throws

Parameters

  • event:

    The event to save.

  • span:

    The span that indicates whether to remove a single event or all future instances of the event in the case of a recurring event.

  • commit:

    To save the event immediately, pass True; otherwise, the change is batched until the Commit() method is invoked.

Mentioned in

Discussion

This method raises an exception if it’s passed an event from another event store.

When saving an event, it’s updated in the Calendar database. Any fields you didn’t modify are updated to reflect the most recent value in the database. If the event has been deleted from the database, it’s recreated as a new event.

See Also

Related Documentation

Accessing calendar events