EventKitInterfaceProtocol
public protocol EventKitInterfaceProtocol
Define metohods required to interact with EventKit framework.
Seealso
EventKitInterface
Seealso
EventKitHandler
-
This closure passes information about a complete asynchronous task.
Depending on the outcome the error may be available, and the success flag changes its value.
Declaration
Swift
typealias CompletionBlock = (Bool, Error?) -> Void -
Adds all calendar items to the
EKEventStore.Declaration
Swift
func addAll(_ calendarItems: [EKCalendarItem], forType type: EKEntityType, completion: @escaping CompletionBlock)Parameters
calendarItemsList of calendar items, a subclasses of
EKCalendarItem.typeType of entity to add.
completionCompletion closure called after items were saved to the store.
-
Remove all calendar items from the
EKEventStore.Declaration
Swift
func removeAll(ofType type: EKEntityType, completion: @escaping CompletionBlock) -
Request access to the
EventKitframework for given item type.Declaration
Swift
func requestAccess(forType type: EKEntityType, completion: @escaping (Bool, Error?, EKEventStore?) -> Void)Parameters
typeType of entity to request access.
completionCompletion closure.
-
Checks if the application is authorized to use events or reminders.
Declaration
Swift
static func authorized(forType type: EKEntityType) -> BoolParameters
typeThe type of entity (events or reminders) to check.
Return Value
trueif the application was authorized,falseotherwise.
EventKitInterfaceProtocol Protocol Reference