Package apple.eventkit
Class EKEventStore
- java.lang.Object
-
- org.moe.natj.general.NativeObject
-
- org.moe.natj.objc.ObjCObject
-
- apple.NSObject
-
- apple.eventkit.EKEventStore
-
- All Implemented Interfaces:
NSObject
public class EKEventStore extends NSObject
EKEventStore The EKEventStore class provides an interface for accessing and manipulating calendar events and reminders. The EKEventStore class is the main point of contact for accessing Calendar data. You must create a EKEventStore object in order to retrieve/add/delete events or reminders from the Calendar database. Events, Reminders, and Calendar objects retrieved from an event store cannot be used with any other event store. It is generally best to hold onto a long-lived instance of an event store, most likely as a singleton instance in your application.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceEKEventStore.Block_enumerateEventsMatchingPredicateUsingBlockstatic interfaceEKEventStore.Block_fetchRemindersMatchingPredicateCompletionstatic interfaceEKEventStore.Block_requestAccessToEntityTypeCompletionstatic interfaceEKEventStore.Block_requestFullAccessToEventsWithCompletionstatic interfaceEKEventStore.Block_requestFullAccessToRemindersWithCompletionstatic interfaceEKEventStore.Block_requestWriteOnlyAccessToEventsWithCompletion-
Nested classes/interfaces inherited from class apple.NSObject
NSObject.Block_accessibilityActivateBlock_ret, NSObject.Block_accessibilityActivationPointBlock_ret, NSObject.Block_accessibilityAttributedHintBlock_ret, NSObject.Block_accessibilityAttributedLabelBlock_ret, NSObject.Block_accessibilityAttributedUserInputLabelsBlock_ret, NSObject.Block_accessibilityAttributedValueBlock_ret, NSObject.Block_accessibilityContainerTypeBlock_ret, NSObject.Block_accessibilityCustomActionsBlock_ret, NSObject.Block_accessibilityCustomRotorsBlock_ret, NSObject.Block_accessibilityDecrementBlock_ret, NSObject.Block_accessibilityElementsBlock_ret, NSObject.Block_accessibilityElementsHiddenBlock_ret, NSObject.Block_accessibilityFrameBlock_ret, NSObject.Block_accessibilityHeaderElementsBlock_ret, NSObject.Block_accessibilityHintBlock_ret, NSObject.Block_accessibilityIdentifierBlock_ret, NSObject.Block_accessibilityIncrementBlock_ret, NSObject.Block_accessibilityLabelBlock_ret, NSObject.Block_accessibilityLanguageBlock_ret, NSObject.Block_accessibilityMagicTapBlock_ret, NSObject.Block_accessibilityNavigationStyleBlock_ret, NSObject.Block_accessibilityPathBlock_ret, NSObject.Block_accessibilityPerformEscapeBlock_ret, NSObject.Block_accessibilityRespondsToUserInteractionBlock_ret, NSObject.Block_accessibilityShouldGroupAccessibilityChildrenBlock_ret, NSObject.Block_accessibilityTextualContextBlock_ret, NSObject.Block_accessibilityTraitsBlock_ret, NSObject.Block_accessibilityUserInputLabelsBlock_ret, NSObject.Block_accessibilityValueBlock_ret, NSObject.Block_accessibilityViewIsModalBlock_ret, NSObject.Block_automationElementsBlock_ret, NSObject.Block_isAccessibilityElementBlock_ret, NSObject.Block_setAccessibilityActivateBlock, NSObject.Block_setAccessibilityActivationPointBlock, NSObject.Block_setAccessibilityAttributedHintBlock, NSObject.Block_setAccessibilityAttributedLabelBlock, NSObject.Block_setAccessibilityAttributedUserInputLabelsBlock, NSObject.Block_setAccessibilityAttributedValueBlock, NSObject.Block_setAccessibilityContainerTypeBlock, NSObject.Block_setAccessibilityCustomActionsBlock, NSObject.Block_setAccessibilityCustomRotorsBlock, NSObject.Block_setAccessibilityDecrementBlock, NSObject.Block_setAccessibilityElementsBlock, NSObject.Block_setAccessibilityElementsHiddenBlock, NSObject.Block_setAccessibilityFrameBlock, NSObject.Block_setAccessibilityHeaderElementsBlock, NSObject.Block_setAccessibilityHintBlock, NSObject.Block_setAccessibilityIdentifierBlock, NSObject.Block_setAccessibilityIncrementBlock, NSObject.Block_setAccessibilityLabelBlock, NSObject.Block_setAccessibilityLanguageBlock, NSObject.Block_setAccessibilityMagicTapBlock, NSObject.Block_setAccessibilityNavigationStyleBlock, NSObject.Block_setAccessibilityPathBlock, NSObject.Block_setAccessibilityPerformEscapeBlock, NSObject.Block_setAccessibilityRespondsToUserInteractionBlock, NSObject.Block_setAccessibilityShouldGroupAccessibilityChildrenBlock, NSObject.Block_setAccessibilityTextualContextBlock, NSObject.Block_setAccessibilityTraitsBlock, NSObject.Block_setAccessibilityUserInputLabelsBlock, NSObject.Block_setAccessibilityValueBlock, NSObject.Block_setAccessibilityViewIsModalBlock, NSObject.Block_setAutomationElementsBlock, NSObject.Block_setIsAccessibilityElementBlock, NSObject.Function_instanceMethodForSelector_ret, NSObject.Function_methodForSelector_ret
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedEKEventStore(org.moe.natj.general.Pointer peer)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static booleanaccessInstanceVariablesDirectly()static EKEventStorealloc()static EKEventStoreallocWithZone(org.moe.natj.general.ptr.VoidPtr zone)static longauthorizationStatusForEntityType(long entityType)authorizationStatusForEntityType: Returns the authorization status for the given entity type API-Since: 6.0static booleanautomaticallyNotifiesObserversForKey(@NotNull java.lang.String key)@NotNull NSArray<? extends EKCalendarItem>calendarItemsWithExternalIdentifier(@NotNull java.lang.String externalIdentifier)calendarItemsWithExternalIdentifier: Returns either matching reminders or the first occurrences of any events matching the given external identifier.@Nullable EKCalendarItemcalendarItemWithIdentifier(@NotNull java.lang.String identifier)calendarItemWithIdentifier: Returns either a reminder or the first occurrence of an event.@NotNull NSArray<? extends EKCalendar>calendars()Deprecated.@NotNull NSArray<? extends EKCalendar>calendarsForEntityType(long entityType)calendarsForEntityType Returns calendars that support a given entity type (reminders, events) API-Since: 6.0@Nullable EKCalendarcalendarWithIdentifier(@NotNull java.lang.String identifier)calendarWithIdentifier: Returns a calendar with a specified identifier.voidcancelFetchRequest(@NotNull java.lang.Object fetchIdentifier)cancelFetchRequest: Given a value returned from fetchRemindersMatchingPredicate, this method can be used to cancel the request.static voidcancelPreviousPerformRequestsWithTarget(@NotNull java.lang.Object aTarget)static voidcancelPreviousPerformRequestsWithTargetSelectorObject(@NotNull java.lang.Object aTarget, @NotNull org.moe.natj.objc.SEL aSelector, @Nullable java.lang.Object anArgument)static @NotNull NSArray<java.lang.String>classFallbacksForKeyedArchiver()static @NotNull org.moe.natj.objc.ClassclassForKeyedUnarchiver()booleancommit(@Nullable org.moe.natj.general.ptr.Ptr<NSError> error)commit: Commits pending changes to the database.static java.lang.StringdebugDescription_static()@Nullable EKCalendardefaultCalendarForNewEvents()[@property] defaultCalendarForNewEvents Returns the calendar that events should be added to by default.@Nullable EKCalendardefaultCalendarForNewReminders()defaultCalendarForNewReminders Returns the calendar that reminders should be added to by default.@NotNull NSArray<? extends EKSource>delegateSources()[@property] delegateSources Returns an unordered array of sources for all available delegates.static java.lang.Stringdescription_static()voidenumerateEventsMatchingPredicateUsingBlock(@NotNull NSPredicate predicate, @NotNull EKEventStore.Block_enumerateEventsMatchingPredicateUsingBlock block)enumerateEventsMatchingPredicate:usingBlock: Searches for events that match the given predicate.@NotNull NSArray<? extends EKEvent>eventsMatchingPredicate(@NotNull NSPredicate predicate)eventsMatchingPredicate: Searches for events that match the given predicate.@NotNull java.lang.StringeventStoreIdentifier()[@property] eventStoreIdentifier Returns a unique identifier string representing this calendar store.@Nullable EKEventeventWithIdentifier(@NotNull java.lang.String identifier)eventWithIdentifier: Returns the first occurrence of an event matching the given event identifier.@NotNull java.lang.ObjectfetchRemindersMatchingPredicateCompletion(@NotNull NSPredicate predicate, @NotNull EKEventStore.Block_fetchRemindersMatchingPredicateCompletion completion)fetchRemindersMatchingPredicate:completion: Fetches reminders asynchronously.static longhash_static()EKEventStoreinit()init API-Since: 4.0EKEventStoreinitWithSources(@NotNull NSArray<? extends EKSource> sources)initWithSources: Creates a new event store that only includes items and calendars for a subset of sources.static NSObject.Function_instanceMethodForSelector_retinstanceMethodForSelector(org.moe.natj.objc.SEL aSelector)static NSMethodSignatureinstanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector)static booleaninstancesRespondToSelector(org.moe.natj.objc.SEL aSelector)static booleanisSubclassOfClass(org.moe.natj.objc.Class aClass)static @NotNull NSSet<java.lang.String>keyPathsForValuesAffectingValueForKey(@NotNull java.lang.String key)static EKEventStorenew_objc()@NotNull NSPredicatepredicateForCompletedRemindersWithCompletionDateStartingEndingCalendars(@Nullable NSDate startDate, @Nullable NSDate endDate, @Nullable NSArray<? extends EKCalendar> calendars)predicateForCompletedRemindersWithCompletionDateStarting:ending:calendars: Fetch completed reminders in a set of calendars.@NotNull NSPredicatepredicateForEventsWithStartDateEndDateCalendars(@NotNull NSDate startDate, @NotNull NSDate endDate, @Nullable NSArray<? extends EKCalendar> calendars)predicateForEventsWithStartDate:endDate:calendars: Creates a predicate for use with eventsMatchingPredicate or enumerateEventsMatchingPredicate:usingBlock:.@NotNull NSPredicatepredicateForIncompleteRemindersWithDueDateStartingEndingCalendars(@Nullable NSDate startDate, @Nullable NSDate endDate, @Nullable NSArray<? extends EKCalendar> calendars)predicateForIncompleteRemindersWithDueDateStarting:ending:calendars: Fetch incomplete reminders in a set of calendars.@NotNull NSPredicatepredicateForRemindersInCalendars(@Nullable NSArray<? extends EKCalendar> calendars)predicateForRemindersInCalendars: Fetch all reminders in a set of calendars.voidrefreshSourcesIfNecessary()refreshSourcesIfNecessary Cause a sync to potentially occur taking into account the necessity of it.booleanremoveCalendarCommitError(@NotNull EKCalendar calendar, boolean commit, @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)removeCalendar:commit:error: Removes a calendar from the database.booleanremoveEventSpanCommitError(@NotNull EKEvent event, long span, boolean commit, @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)API-Since: 5.0booleanremoveEventSpanError(@NotNull EKEvent event, long span, @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)removeEvent:span:error: Removes an event from the calendar store.booleanremoveReminderCommitError(@NotNull EKReminder reminder, boolean commit, @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)removeReminder:commit:error: Removes a reminder from the event store.voidrequestAccessToEntityTypeCompletion(long entityType, @NotNull EKEventStore.Block_requestAccessToEntityTypeCompletion completion)Deprecated.voidrequestFullAccessToEventsWithCompletion(@NotNull EKEventStore.Block_requestFullAccessToEventsWithCompletion completion)API-Since: 17.0voidrequestFullAccessToRemindersWithCompletion(@NotNull EKEventStore.Block_requestFullAccessToRemindersWithCompletion completion)API-Since: 17.0voidrequestWriteOnlyAccessToEventsWithCompletion(@NotNull EKEventStore.Block_requestWriteOnlyAccessToEventsWithCompletion completion)API-Since: 17.0voidreset()reset Resets the event store.static booleanresolveClassMethod(org.moe.natj.objc.SEL sel)static booleanresolveInstanceMethod(org.moe.natj.objc.SEL sel)booleansaveCalendarCommitError(@NotNull EKCalendar calendar, boolean commit, @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)saveCalendar:commit:error: Saves changes to a calendar, or adds a new calendar to the database.booleansaveEventSpanCommitError(@NotNull EKEvent event, long span, boolean commit, @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)These variants of the above allow you to batch changes by passing NO to commit.booleansaveEventSpanError(@NotNull EKEvent event, long span, @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)saveEvent:span:error: Saves changes to an event permanently.booleansaveReminderCommitError(@NotNull EKReminder reminder, boolean commit, @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)saveReminder:commit:error: Saves changes to a reminder.static voidsetVersion_static(long aVersion)@NotNull NSArray<? extends EKSource>sources()[@property] sources Returns an unordered array of sources.@Nullable EKSourcesourceWithIdentifier(@NotNull java.lang.String identifier)sourceWithIdentifier: Returns a source with a specified identifier.static org.moe.natj.objc.Classsuperclass_static()static booleanuseStoredAccessor()Deprecated.static longversion_static()-
Methods inherited from class apple.NSObject
accessibilityActivate, accessibilityActivateBlock, accessibilityActivationPoint, accessibilityActivationPointBlock, accessibilityAssistiveTechnologyFocusedIdentifiers, accessibilityAttributedHint, accessibilityAttributedHintBlock, accessibilityAttributedLabel, accessibilityAttributedLabelBlock, accessibilityAttributedUserInputLabels, accessibilityAttributedUserInputLabelsBlock, accessibilityAttributedValue, accessibilityAttributedValueBlock, accessibilityContainerType, accessibilityContainerTypeBlock, accessibilityCustomActions, accessibilityCustomActionsBlock, accessibilityCustomRotors, accessibilityCustomRotorsBlock, accessibilityDecrement, accessibilityDecrementBlock, accessibilityDirectTouchOptions, accessibilityDragSourceDescriptors, accessibilityDropPointDescriptors, accessibilityElementAtIndex, accessibilityElementCount, accessibilityElementDidBecomeFocused, accessibilityElementDidLoseFocus, accessibilityElementIsFocused, accessibilityElements, accessibilityElementsBlock, accessibilityElementsHidden, accessibilityElementsHiddenBlock, accessibilityFrame, accessibilityFrameBlock, accessibilityHeaderElementsBlock, accessibilityHint, accessibilityHintBlock, accessibilityIdentifierBlock, accessibilityIncrement, accessibilityIncrementBlock, accessibilityLabel, accessibilityLabelBlock, accessibilityLanguage, accessibilityLanguageBlock, accessibilityMagicTapBlock, accessibilityNavigationStyle, accessibilityNavigationStyleBlock, accessibilityPath, accessibilityPathBlock, accessibilityPerformEscape, accessibilityPerformEscapeBlock, accessibilityPerformMagicTap, accessibilityRespondsToUserInteraction, accessibilityRespondsToUserInteractionBlock, accessibilityScroll, accessibilityShouldGroupAccessibilityChildrenBlock, accessibilityTextualContext, accessibilityTextualContextBlock, accessibilityTraits, accessibilityTraitsBlock, accessibilityUserInputLabels, accessibilityUserInputLabelsBlock, accessibilityValue, accessibilityValueBlock, accessibilityViewIsModal, accessibilityViewIsModalBlock, accessibilityZoomInAtPoint, accessibilityZoomOutAtPoint, addObserverForKeyPathOptionsContext, attemptRecoveryFromErrorOptionIndex, attemptRecoveryFromErrorOptionIndexDelegateDidRecoverSelectorContextInfo, autoContentAccessingProxy, automationElements, automationElementsBlock, awakeAfterUsingCoder, awakeFromNib, class_objc, classForCoder, classForKeyedArchiver, copy, dealloc, debugDescription, description, dictionaryWithValuesForKeys, didChangeValueForKey, didChangeValueForKeyWithSetMutationUsingObjects, didChangeValuesAtIndexesForKey, doesNotRecognizeSelector, fileManagerShouldProceedAfterError, fileManagerWillProcessPath, finalize_objc, forwardingTargetForSelector, forwardInvocation, handleQueryWithUnboundKey, handleTakeValueForUnboundKey, hash, indexOfAccessibilityElement, isAccessibilityElement, isAccessibilityElementBlock, isEqual, isKindOfClass, isMemberOfClass, isProxy, methodForSelector, methodSignatureForSelector, mutableArrayValueForKey, mutableArrayValueForKeyPath, mutableCopy, mutableOrderedSetValueForKey, mutableOrderedSetValueForKeyPath, mutableSetValueForKey, mutableSetValueForKeyPath, observationInfo, observeValueForKeyPathOfObjectChangeContext, performSelector, performSelectorInBackgroundWithObject, performSelectorOnMainThreadWithObjectWaitUntilDone, performSelectorOnMainThreadWithObjectWaitUntilDoneModes, performSelectorOnThreadWithObjectWaitUntilDone, performSelectorOnThreadWithObjectWaitUntilDoneModes, performSelectorWithObject, performSelectorWithObjectAfterDelay, performSelectorWithObjectAfterDelayInModes, performSelectorWithObjectWithObject, prepareForInterfaceBuilder, provideImageDataBytesPerRowOrigin_Size_UserInfo, removeObserverForKeyPath, removeObserverForKeyPathContext, replacementObjectForCoder, replacementObjectForKeyedArchiver, respondsToSelector, self, setAccessibilityActivateBlock, setAccessibilityActivationPoint, setAccessibilityActivationPointBlock, setAccessibilityAttributedHint, setAccessibilityAttributedHintBlock, setAccessibilityAttributedLabel, setAccessibilityAttributedLabelBlock, setAccessibilityAttributedUserInputLabels, setAccessibilityAttributedUserInputLabelsBlock, setAccessibilityAttributedValue, setAccessibilityAttributedValueBlock, setAccessibilityContainerType, setAccessibilityContainerTypeBlock, setAccessibilityCustomActions, setAccessibilityCustomActionsBlock, setAccessibilityCustomRotors, setAccessibilityCustomRotorsBlock, setAccessibilityDecrementBlock, setAccessibilityDirectTouchOptions, setAccessibilityDragSourceDescriptors, setAccessibilityDropPointDescriptors, setAccessibilityElements, setAccessibilityElementsBlock, setAccessibilityElementsHidden, setAccessibilityElementsHiddenBlock, setAccessibilityFrame, setAccessibilityFrameBlock, setAccessibilityHeaderElementsBlock, setAccessibilityHint, setAccessibilityHintBlock, setAccessibilityIdentifierBlock, setAccessibilityIncrementBlock, setAccessibilityLabel, setAccessibilityLabelBlock, setAccessibilityLanguage, setAccessibilityLanguageBlock, setAccessibilityMagicTapBlock, setAccessibilityNavigationStyle, setAccessibilityNavigationStyleBlock, setAccessibilityPath, setAccessibilityPathBlock, setAccessibilityPerformEscapeBlock, setAccessibilityRespondsToUserInteraction, setAccessibilityRespondsToUserInteractionBlock, setAccessibilityShouldGroupAccessibilityChildrenBlock, setAccessibilityTextualContext, setAccessibilityTextualContextBlock, setAccessibilityTraits, setAccessibilityTraitsBlock, setAccessibilityUserInputLabels, setAccessibilityUserInputLabelsBlock, setAccessibilityValue, setAccessibilityValueBlock, setAccessibilityViewIsModal, setAccessibilityViewIsModalBlock, setAutomationElements, setAutomationElementsBlock, setIsAccessibilityElement, setIsAccessibilityElementBlock, setNilValueForKey, setObservationInfo, setShouldGroupAccessibilityChildren, setValueForKey, setValueForKeyPath, setValueForUndefinedKey, setValuesForKeysWithDictionary, shouldGroupAccessibilityChildren, storedValueForKey, superclass, takeStoredValueForKey, takeValueForKey, takeValueForKeyPath, takeValuesFromDictionary, unableToSetNilForKey, validateValueForKeyError, validateValueForKeyPathError, valueForKey, valueForKeyPath, valueForUndefinedKey, valuesForKeys, willChangeValueForKey, willChangeValueForKeyWithSetMutationUsingObjects, willChangeValuesAtIndexesForKey
-
-
-
-
Method Detail
-
accessInstanceVariablesDirectly
public static boolean accessInstanceVariablesDirectly()
-
alloc
public static EKEventStore alloc()
-
allocWithZone
public static EKEventStore allocWithZone(org.moe.natj.general.ptr.VoidPtr zone)
-
authorizationStatusForEntityType
public static long authorizationStatusForEntityType(long entityType)
authorizationStatusForEntityType: Returns the authorization status for the given entity type API-Since: 6.0
-
automaticallyNotifiesObserversForKey
public static boolean automaticallyNotifiesObserversForKey(@NotNull @NotNull java.lang.String key)
-
cancelPreviousPerformRequestsWithTarget
public static void cancelPreviousPerformRequestsWithTarget(@NotNull @NotNull java.lang.Object aTarget)
-
cancelPreviousPerformRequestsWithTargetSelectorObject
public static void cancelPreviousPerformRequestsWithTargetSelectorObject(@NotNull @NotNull java.lang.Object aTarget, @NotNull @NotNull org.moe.natj.objc.SEL aSelector, @Nullable @Nullable java.lang.Object anArgument)
-
classFallbacksForKeyedArchiver
@NotNull public static @NotNull NSArray<java.lang.String> classFallbacksForKeyedArchiver()
-
classForKeyedUnarchiver
@NotNull public static @NotNull org.moe.natj.objc.Class classForKeyedUnarchiver()
-
debugDescription_static
public static java.lang.String debugDescription_static()
-
description_static
public static java.lang.String description_static()
-
hash_static
public static long hash_static()
-
instanceMethodForSelector
public static NSObject.Function_instanceMethodForSelector_ret instanceMethodForSelector(org.moe.natj.objc.SEL aSelector)
-
instanceMethodSignatureForSelector
public static NSMethodSignature instanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector)
-
instancesRespondToSelector
public static boolean instancesRespondToSelector(org.moe.natj.objc.SEL aSelector)
-
isSubclassOfClass
public static boolean isSubclassOfClass(org.moe.natj.objc.Class aClass)
-
keyPathsForValuesAffectingValueForKey
@NotNull public static @NotNull NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey(@NotNull @NotNull java.lang.String key)
-
new_objc
public static EKEventStore new_objc()
-
resolveClassMethod
public static boolean resolveClassMethod(org.moe.natj.objc.SEL sel)
-
resolveInstanceMethod
public static boolean resolveInstanceMethod(org.moe.natj.objc.SEL sel)
-
setVersion_static
public static void setVersion_static(long aVersion)
-
superclass_static
public static org.moe.natj.objc.Class superclass_static()
-
version_static
public static long version_static()
-
calendarItemWithIdentifier
@Nullable public @Nullable EKCalendarItem calendarItemWithIdentifier(@NotNull @NotNull java.lang.String identifier)
calendarItemWithIdentifier: Returns either a reminder or the first occurrence of an event. API-Since: 6.0
-
calendarItemsWithExternalIdentifier
@NotNull public @NotNull NSArray<? extends EKCalendarItem> calendarItemsWithExternalIdentifier(@NotNull @NotNull java.lang.String externalIdentifier)
calendarItemsWithExternalIdentifier: Returns either matching reminders or the first occurrences of any events matching the given external identifier. This method returns a set of EKEvents or EKReminders with the given external identifier. Due to reasons discussed in -[EKCalendarItem calendarItemExternalIdentifier], there may be more than one matching calendar item.- Parameters:
externalIdentifier- The value obtained from EKCalendarItem's calendarItemExternalIdentifier property- Returns:
- An unsorted array of EKCalendarItem instances API-Since: 6.0
-
calendarWithIdentifier
@Nullable public @Nullable EKCalendar calendarWithIdentifier(@NotNull @NotNull java.lang.String identifier)
calendarWithIdentifier: Returns a calendar with a specified identifier. API-Since: 5.0
-
calendars
@NotNull @Deprecated public @NotNull NSArray<? extends EKCalendar> calendars()
Deprecated.calendars While this returns an array, the calendars are unordered. This call is deprecated and only returns calendars that support events. If you want reminder calendars you should use calendarsForEntityType: API-Since: 4.0 Deprecated-Since: 6.0
-
calendarsForEntityType
@NotNull public @NotNull NSArray<? extends EKCalendar> calendarsForEntityType(long entityType)
calendarsForEntityType Returns calendars that support a given entity type (reminders, events) API-Since: 6.0
-
cancelFetchRequest
public void cancelFetchRequest(@NotNull @NotNull java.lang.Object fetchIdentifier)cancelFetchRequest: Given a value returned from fetchRemindersMatchingPredicate, this method can be used to cancel the request. Once called, the completion block specified in fetchReminders... will not be called. API-Since: 6.0
-
commit
public boolean commit(@Nullable @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)commit: Commits pending changes to the database. If you use saveCalendar/saveEvent/removeCalendar/removeEvent, etc. and you pass NO to their parameter, you are batching changes for a later commit. This method does that commit. This allows you to save the database only once for many additions or changes. If you pass YES to methods' commit parameter, then you don't need to call this method. This method will return YES as long as nothing went awry, even if nothing was actually committed. If it returns NO, error should contain the reason it became unhappy. On WatchOS, modifying the database is not supported. API-Since: 5.0
-
defaultCalendarForNewEvents
@Nullable public @Nullable EKCalendar defaultCalendarForNewEvents()
[@property] defaultCalendarForNewEvents Returns the calendar that events should be added to by default. This may be nil if there is no default calendar for new events.
-
defaultCalendarForNewReminders
@Nullable public @Nullable EKCalendar defaultCalendarForNewReminders()
defaultCalendarForNewReminders Returns the calendar that reminders should be added to by default. This may be nil if there is no default calendar for new reminders. API-Since: 6.0
-
enumerateEventsMatchingPredicateUsingBlock
public void enumerateEventsMatchingPredicateUsingBlock(@NotNull @NotNull NSPredicate predicate, @NotNull @NotNull EKEventStore.Block_enumerateEventsMatchingPredicateUsingBlock block)enumerateEventsMatchingPredicate:usingBlock: Searches for events that match the given predicate. This call executes a search for the events indicated by the predicate passed to it, calling the block specified in the callback parameter for each event. This method is synchronous. If you want async behavior, you should either use dispatch_async or NSOperation to run the query someplace other than the main thread.- Parameters:
predicate- The predicate to invoke. If this predicate was not created with the predicate creation functions in this class, an exception is raised.block- The block to call for each event. Your block should return YES in the stop parameter to stop iterating.
-
eventStoreIdentifier
@NotNull public @NotNull java.lang.String eventStoreIdentifier()
[@property] eventStoreIdentifier Returns a unique identifier string representing this calendar store.
-
eventWithIdentifier
@Nullable public @Nullable EKEvent eventWithIdentifier(@NotNull @NotNull java.lang.String identifier)
eventWithIdentifier: Returns the first occurrence of an event matching the given event identifier.- Parameters:
identifier- The eventIdentifier to search for.- Returns:
- An EKEvent object, or nil if not found.
-
eventsMatchingPredicate
@NotNull public @NotNull NSArray<? extends EKEvent> eventsMatchingPredicate(@NotNull @NotNull NSPredicate predicate)
eventsMatchingPredicate: Searches for events that match the given predicate. This call executes a search for the events indicated by the predicate passed to it. It is synchronous. If you want async behavior, you should either use dispatch_async or NSOperation to run the query someplace other than the main thread, and then funnel the array back to the main thread.- Parameters:
predicate- The predicate to invoke. If this predicate was not created with the predicate creation functions in this class, an exception is raised.- Returns:
- An array of EKEvent objects, or nil. There is no guaranteed order to the events.
-
fetchRemindersMatchingPredicateCompletion
@NotNull public @NotNull java.lang.Object fetchRemindersMatchingPredicateCompletion(@NotNull @NotNull NSPredicate predicate, @NotNull @NotNull EKEventStore.Block_fetchRemindersMatchingPredicateCompletion completion)fetchRemindersMatchingPredicate:completion: Fetches reminders asynchronously. This method fetches reminders asynchronously and returns a value which can be used in cancelFetchRequest: to cancel the request later if desired. The completion block is called with an array of reminders that match the given predicate (or potentially nil). API-Since: 6.0
-
init
public EKEventStore init()
init API-Since: 4.0
-
predicateForCompletedRemindersWithCompletionDateStartingEndingCalendars
@NotNull public @NotNull NSPredicate predicateForCompletedRemindersWithCompletionDateStartingEndingCalendars(@Nullable @Nullable NSDate startDate, @Nullable @Nullable NSDate endDate, @Nullable @Nullable NSArray<? extends EKCalendar> calendars)
predicateForCompletedRemindersWithCompletionDateStarting:ending:calendars: Fetch completed reminders in a set of calendars. You can use this method to search for reminders completed between a range of dates. You can pass nil for start date to find all reminders completed before endDate. You can pass nil for both start and end date to get all completed reminders in the specified calendars. You can pass nil for calendars to fetch from all available calendars. API-Since: 6.0
-
predicateForEventsWithStartDateEndDateCalendars
@NotNull public @NotNull NSPredicate predicateForEventsWithStartDateEndDateCalendars(@NotNull @NotNull NSDate startDate, @NotNull @NotNull NSDate endDate, @Nullable @Nullable NSArray<? extends EKCalendar> calendars)
predicateForEventsWithStartDate:endDate:calendars: Creates a predicate for use with eventsMatchingPredicate or enumerateEventsMatchingPredicate:usingBlock:. Creates a simple query predicate to search for events within a certain date range. At present, this will return events in the default time zone ([NSTimeZone defaultTimeZone]). For performance reasons, this method will only return events within a four year timespan. If the date range between the startDate and endDate is greater than four years, then it will be shortened to the first four years.- Parameters:
startDate- The start date.endDate- The end date.calendars- The calendars to search for events in, or nil to search all calendars.
-
predicateForIncompleteRemindersWithDueDateStartingEndingCalendars
@NotNull public @NotNull NSPredicate predicateForIncompleteRemindersWithDueDateStartingEndingCalendars(@Nullable @Nullable NSDate startDate, @Nullable @Nullable NSDate endDate, @Nullable @Nullable NSArray<? extends EKCalendar> calendars)
predicateForIncompleteRemindersWithDueDateStarting:ending:calendars: Fetch incomplete reminders in a set of calendars. You can use this method to search for incomplete reminders due in a range. You can pass nil for start date to find all reminders due before endDate. You can pass nil for both start and end date to get all incomplete reminders in the specified calendars. You can pass nil for calendars to fetch from all available calendars. API-Since: 6.0
-
predicateForRemindersInCalendars
@NotNull public @NotNull NSPredicate predicateForRemindersInCalendars(@Nullable @Nullable NSArray<? extends EKCalendar> calendars)
predicateForRemindersInCalendars: Fetch all reminders in a set of calendars. You can pass nil for calendars to fetch from all available calendars. API-Since: 6.0
-
refreshSourcesIfNecessary
public void refreshSourcesIfNecessary()
refreshSourcesIfNecessary Cause a sync to potentially occur taking into account the necessity of it. You can call this method to pull new data from remote sources. This only updates the event store's data. If you want to update your objects after refreshing the sources, you should call refresh on each of them afterwards. On iOS and macOS, this sync only occurs if deemed necessary. On WatchOS, initiating sync is not available. Sync will occur automatically with the paired iOS device. API-Since: 5.0
-
removeCalendarCommitError
public boolean removeCalendarCommitError(@NotNull @NotNull EKCalendar calendar, boolean commit, @Nullable @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)removeCalendar:commit:error: Removes a calendar from the database. This method attempts to delete the given calendar from the calendar database. It returns YES if successful and NO otherwise. Passing a calendar fetched from another EKEventStore instance into this function will raise an exception. If the calendar supports multiple entity types (allowedEntityTypes), but the user has not granted you access to all those entity types, then we will delete all of the entity types for which you have access and remove that entity type from the allowedEntityTypes. For example: If a calendar supports both events and reminders, but you only have access to reminders, we will delete all the reminders and make the calendar only support events. If you have access to all of its allowedEntityTypes, then it will delete the calendar and all of the events and reminders in the calendar. On WatchOS, modifying the database is not supported.- Parameters:
calendar- The calendar to delete.commit- Pass YES to cause the database to save. You can pass NO to batch multiple changes and then call commit: to save them all at once.error- If an error occurs, this will contain a valid NSError object on exit. API-Since: 5.0
-
removeEventSpanCommitError
public boolean removeEventSpanCommitError(@NotNull @NotNull EKEvent event, long span, boolean commit, @Nullable @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)API-Since: 5.0
-
removeEventSpanError
public boolean removeEventSpanError(@NotNull @NotNull EKEvent event, long span, @Nullable @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)removeEvent:span:error: Removes an event from the calendar store. This method attempts to remove the event from the calendar database. It returns YES if successful and NO otherwise. It's possible for this method to return NO, and error will be set to nil. This occurs if the event wasn't ever added and didn't need removing. This means the correct way to detect failure is a result of NO and a non-nil error parameter. Passing an event from another CalendarStore into this function will raise an exception. After an event is removed, it is no longer tied to this calendar store, and all data in the event is cleared except for the eventIdentifier. On WatchOS, modifying the database is not supported.- Parameters:
event- The event to save.span- The span to use (this event, or this and future events).error- If an error occurs, this will contain a valid NSError object on exit. API-Since: 4.0
-
removeReminderCommitError
public boolean removeReminderCommitError(@NotNull @NotNull EKReminder reminder, boolean commit, @Nullable @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)removeReminder:commit:error: Removes a reminder from the event store. This method attempts to remove the reminder from the event store database. It returns YES if successful and NO otherwise. Passing a reminder from another EKEventStore into this function will raise an exception. After a reminder is removed, it is no longer tied to this event store. On WatchOS, modifying the database is not supported.- Parameters:
reminder- The reminder to save.commit- Whether to save to the database or not. Pass NO to batch changes together and commit with [EKEventStore commit:].error- If an error occurs, this will contain a valid NSError object on exit. API-Since: 6.0
-
requestAccessToEntityTypeCompletion
@Deprecated public void requestAccessToEntityTypeCompletion(long entityType, @NotNull @NotNull EKEventStore.Block_requestAccessToEntityTypeCompletion completion)Deprecated.API-Since: 6.0 Deprecated-Since: 17.0 Deprecated-Message: Use -requestFullAccessToEventsWithCompletion:, -requestWriteOnlyAccessToEventsWithCompletion:, or -requestFullAccessToRemindersWithCompletion:
-
reset
public void reset()
reset Resets the event store. You can use this method to forget ALL changes made to the event store (all additions, all fetched objects, etc.). It essentially is as if you released the store and then created a new one. It brings it back to its initial state. All objects ever created/fetched, etc. using this store are no longer connected to it and are considered invalid. API-Since: 5.0
-
saveCalendarCommitError
public boolean saveCalendarCommitError(@NotNull @NotNull EKCalendar calendar, boolean commit, @Nullable @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)saveCalendar:commit:error: Saves changes to a calendar, or adds a new calendar to the database. This method attempts to save the given calendar to the calendar database. It returns YES if successful and NO otherwise. Passing a calendar fetched from another EKEventStore instance into this function will raise an exception. On WatchOS, saving changes is not supported.- Parameters:
calendar- The calendar to save.commit- Pass YES to cause the database to save. You can pass NO to save multiple calendars and then call commit: to save them all at once.error- If an error occurs, this will contain a valid NSError object on exit. API-Since: 5.0
-
saveEventSpanCommitError
public boolean saveEventSpanCommitError(@NotNull @NotNull EKEvent event, long span, boolean commit, @Nullable @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)These variants of the above allow you to batch changes by passing NO to commit. You can commit all changes later with [EKEventStore commit:] API-Since: 5.0
-
saveEventSpanError
public boolean saveEventSpanError(@NotNull @NotNull EKEvent event, long span, @Nullable @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)saveEvent:span:error: Saves changes to an event permanently. This method attempts to save the event to the calendar database. It returns YES if successful and NO otherwise. It's possible for this method to return NO, and error will be set to nil. This occurs if the event wasn't dirty and didn't need saving. This means the correct way to detect failure is a result of NO and a non-nil error parameter. Passing an event fetched from another EKEventStore instance into this function will raise an exception. After an event is successfully saved, it is also put into sync with the database, meaning that all fields you did not change will be updated to the latest values. If you save the event, but it was deleted by a different store/process, you will effectively recreate the event as a new event. On WatchOS, saving changes is not supported.- Parameters:
event- The event to save.span- The span to use (this event, or this and future events).error- If an error occurs, this will contain a valid NSError object on exit. API-Since: 4.0
-
saveReminderCommitError
public boolean saveReminderCommitError(@NotNull @NotNull EKReminder reminder, boolean commit, @Nullable @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)saveReminder:commit:error: Saves changes to a reminder. This method attempts to save the reminder to the event store database. It returns YES if successful and NO otherwise. Passing a reminder fetched from another EKEventStore instance into this function will raise an exception. After a reminder is successfully saved, its fields are updated to the latest values in the database. On WatchOS, saving changes is not supported.- Parameters:
reminder- The reminder to save.commit- Whether to save to the database or not. Pass NO to batch changes together and commit with [EKEventStore commit:].error- If an error occurs, this will contain a valid NSError object on exit. API-Since: 6.0
-
sourceWithIdentifier
@Nullable public @Nullable EKSource sourceWithIdentifier(@NotNull @NotNull java.lang.String identifier)
sourceWithIdentifier: Returns a source with a specified identifier. API-Since: 5.0
-
sources
@NotNull public @NotNull NSArray<? extends EKSource> sources()
[@property] sources Returns an unordered array of sources. API-Since: 5.0
-
delegateSources
@NotNull public @NotNull NSArray<? extends EKSource> delegateSources()
[@property] delegateSources Returns an unordered array of sources for all available delegates. API-Since: 12.0
-
initWithSources
public EKEventStore initWithSources(@NotNull @NotNull NSArray<? extends EKSource> sources)
initWithSources: Creates a new event store that only includes items and calendars for a subset of sources.- Parameters:
sources- The sources you want this event store to recognize. This may include delegate sources. API-Since: 16.0
-
requestFullAccessToEventsWithCompletion
public void requestFullAccessToEventsWithCompletion(@NotNull @NotNull EKEventStore.Block_requestFullAccessToEventsWithCompletion completion)API-Since: 17.0
-
requestFullAccessToRemindersWithCompletion
public void requestFullAccessToRemindersWithCompletion(@NotNull @NotNull EKEventStore.Block_requestFullAccessToRemindersWithCompletion completion)API-Since: 17.0
-
requestWriteOnlyAccessToEventsWithCompletion
public void requestWriteOnlyAccessToEventsWithCompletion(@NotNull @NotNull EKEventStore.Block_requestWriteOnlyAccessToEventsWithCompletion completion)API-Since: 17.0
-
useStoredAccessor
@Deprecated public static boolean useStoredAccessor()
Deprecated.
-
-