Commits all unsaved changes to the event store.
- iOS 5.0+
- macOS 10.8+
- Mac Catalyst 13.0+
If the commit operation succeeded,
true even when there are no changes to commit.
This method allows you to save batched changes to the event store. For example, if you pass
false as the
commit parameter to the
remove(_: methods, the changes are not saved until this method is invoked. Likewise, if you pass
true as the
commit parameter to the aforementioned methods, there is no need to call this method.