peachsim 0.1.2176 → 0.1.2179
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-lib/agent-daemon-client.cjs +1 -1
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/attached-projects.cjs +1 -1
- package/dist-lib/auth/shared-session.cjs +1 -1
- package/dist-lib/backend-origin.cjs +1 -1
- package/dist-lib/beta.cjs +1 -1
- package/dist-lib/beta.mjs +1 -1
- package/dist-lib/bridge-constants.cjs +1 -1
- package/dist-lib/bridge-contract-input.cjs +1 -1
- package/dist-lib/bridge-contract-input.mjs +1 -1
- package/dist-lib/bridge-contract.cjs +1 -1
- package/dist-lib/bridge-contract.mjs +1 -1
- package/dist-lib/bundle-channel.cjs +2205 -1861
- package/dist-lib/capture-contract.cjs +1 -1
- package/dist-lib/capture-contract.mjs +1 -1
- package/dist-lib/cloud-contract.cjs +1 -1
- package/dist-lib/cloud-contract.mjs +1 -1
- package/dist-lib/cloud-test-args.cjs +1 -1
- package/dist-lib/cloud-test-args.mjs +1 -1
- package/dist-lib/cloud.cjs +1 -1
- package/dist-lib/cloud.mjs +1 -1
- package/dist-lib/config.cjs +1 -1
- package/dist-lib/config.mjs +1 -1
- package/dist-lib/detox/index.cjs +1 -1
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/expo-swift-bundle.cjs +837 -571
- package/dist-lib/expo-swift-metadata.cjs +1 -1
- package/dist-lib/expo-swift-metadata.mjs +1 -1
- package/dist-lib/home-paths.cjs +1 -1
- package/dist-lib/host/bridge-host.cjs +1732 -1396
- package/dist-lib/host/fetch-proxy-handler.cjs +2 -2
- package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
- package/dist-lib/host/replacement-module-handler.cjs +1 -1
- package/dist-lib/host/websocket-proxy.cjs +1 -1
- package/dist-lib/index.cjs +2 -2
- package/dist-lib/jump-to-source-babel.cjs +1 -1
- package/dist-lib/jump-to-source-native.cjs +1 -1
- package/dist-lib/kotlin-host.cjs +1 -1
- package/dist-lib/menu.cjs +1 -1
- package/dist-lib/menu.mjs +1 -1
- package/dist-lib/metro-fingerprint-registry.cjs +1 -1
- package/dist-lib/metro-fingerprint-registry.mjs +1 -1
- package/dist-lib/metro-production-bundle.cjs +1 -1
- package/dist-lib/metro-production-bundle.mjs +1 -1
- package/dist-lib/metro.cjs +2 -2
- package/dist-lib/native-app-identity-project.cjs +2 -2
- package/dist-lib/native-app-identity-project.mjs +2 -2
- package/dist-lib/native-app-identity.cjs +1 -1
- package/dist-lib/native-app-identity.mjs +1 -1
- package/dist-lib/native-firebase-metadata.cjs +1 -1
- package/dist-lib/native-firebase-metadata.mjs +1 -1
- package/dist-lib/pdfium-raster.cjs +1 -1
- package/dist-lib/pdfium-raster.mjs +1 -1
- package/dist-lib/plist.cjs +1 -1
- package/dist-lib/plist.mjs +1 -1
- package/dist-lib/profiles.cjs +1 -1
- package/dist-lib/public-brand.cjs +1 -1
- package/dist-lib/public-origins-lib-esm.json +24 -24
- package/dist-lib/public-origins-lib.json +59 -54
- package/dist-lib/react-native-host-modules.cjs +1 -1
- package/dist-lib/react-native-host-modules.mjs +1 -1
- package/dist-lib/reap-browser.cjs +1 -1
- package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
- package/dist-lib/sdk.cjs +1 -1
- package/dist-lib/sdk.mjs +1 -1
- package/dist-lib/skills.cjs +2223 -1876
- package/dist-lib/swift-compile.cjs +2 -2
- package/dist-lib/swift-compile.mjs +2 -2
- package/dist-lib/swift-package.cjs +1 -1
- package/dist-lib/swift-package.mjs +1 -1
- package/dist-lib/swift-submit.cjs +1 -1
- package/dist-lib/swift-submit.mjs +1 -1
- package/dist-lib/swift-toolchain.cjs +1 -1
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vite-swift.cjs +1587 -1319
- package/dist-lib/vite.cjs +2 -2
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +1 -1
- package/package.json +1 -1
- package/sdk/ios/System/Library/Frameworks/Contacts.framework/Headers/CNChangeHistoryEvent.h +116 -0
- package/sdk/ios/System/Library/Frameworks/Contacts.framework/Headers/CNChangeHistoryFetchRequest.h +79 -0
- package/sdk/ios/System/Library/Frameworks/Contacts.framework/Headers/CNContact+NSItemProvider.h +13 -0
- package/sdk/ios/System/Library/Frameworks/Contacts.framework/Headers/CNContact+Predicates.h +60 -0
- package/sdk/ios/System/Library/Frameworks/Contacts.framework/Headers/CNContact.h +169 -0
- package/sdk/ios/System/Library/Frameworks/Contacts.framework/Headers/CNContactFetchRequest.h +72 -0
- package/sdk/ios/System/Library/Frameworks/Contacts.framework/Headers/CNContactFormatter.h +136 -0
- package/sdk/ios/System/Library/Frameworks/Contacts.framework/Headers/CNContactProperty.h +47 -0
- package/sdk/ios/System/Library/Frameworks/Contacts.framework/Headers/CNContactRelation.h +287 -0
- package/sdk/ios/System/Library/Frameworks/Contacts.framework/Headers/CNContactStore.h +242 -0
- package/sdk/ios/System/Library/Frameworks/Contacts.framework/Headers/CNContactVCardSerialization.h +62 -0
- package/sdk/ios/System/Library/Frameworks/Contacts.framework/Headers/CNContactsUserDefaults.h +29 -0
- package/sdk/ios/System/Library/Frameworks/Contacts.framework/Headers/CNContainer+Predicates.h +29 -0
- package/sdk/ios/System/Library/Frameworks/Contacts.framework/Headers/CNContainer.h +44 -0
- package/sdk/ios/System/Library/Frameworks/Contacts.framework/Headers/CNError.h +64 -0
- package/sdk/ios/System/Library/Frameworks/Contacts.framework/Headers/CNFetchRequest.h +17 -0
- package/sdk/ios/System/Library/Frameworks/Contacts.framework/Headers/CNFetchResult.h +26 -0
- package/sdk/ios/System/Library/Frameworks/Contacts.framework/Headers/CNGroup+Predicates.h +28 -0
- package/sdk/ios/System/Library/Frameworks/Contacts.framework/Headers/CNGroup.h +34 -0
- package/sdk/ios/System/Library/Frameworks/Contacts.framework/Headers/CNInstantMessageAddress.h +52 -0
- package/sdk/ios/System/Library/Frameworks/Contacts.framework/Headers/CNLabeledValue.h +69 -0
- package/sdk/ios/System/Library/Frameworks/Contacts.framework/Headers/CNMutableContact.h +74 -0
- package/sdk/ios/System/Library/Frameworks/Contacts.framework/Headers/CNMutableGroup.h +25 -0
- package/sdk/ios/System/Library/Frameworks/Contacts.framework/Headers/CNMutablePostalAddress.h +35 -0
- package/sdk/ios/System/Library/Frameworks/Contacts.framework/Headers/CNPhoneNumber.h +44 -0
- package/sdk/ios/System/Library/Frameworks/Contacts.framework/Headers/CNPostalAddress.h +50 -0
- package/sdk/ios/System/Library/Frameworks/Contacts.framework/Headers/CNPostalAddressFormatter.h +91 -0
- package/sdk/ios/System/Library/Frameworks/Contacts.framework/Headers/CNSaveRequest.h +136 -0
- package/sdk/ios/System/Library/Frameworks/Contacts.framework/Headers/CNSocialProfile.h +55 -0
- package/sdk/ios/System/Library/Frameworks/Contacts.framework/Headers/Contacts.apinotes +28 -0
- package/sdk/ios/System/Library/Frameworks/Contacts.framework/Headers/Contacts.h +42 -0
- package/sdk/ios/System/Library/Frameworks/Contacts.framework/Headers/ContactsDefines.h +14 -0
- package/sdk/ios/System/Library/Frameworks/Contacts.framework/Modules/module.modulemap +5 -0
- package/sdk/ios/System/Library/Frameworks/ContactsUI.framework/Headers/CNContactPickerViewController.h +92 -0
- package/sdk/ios/System/Library/Frameworks/ContactsUI.framework/Headers/CNContactViewController.h +157 -0
- package/sdk/ios/System/Library/Frameworks/ContactsUI.framework/Headers/ContactsUI.h +10 -0
- package/sdk/ios/System/Library/Frameworks/ContactsUI.framework/Headers/UIApplicationShortcutIcon+Contacts.h +22 -0
- package/sdk/ios/System/Library/Frameworks/ContactsUI.framework/Modules/module.modulemap +5 -0
- package/sdk/ios/System/Library/Frameworks/CoreData.framework/Headers/NSFetchedResultsController.h +8 -0
- package/sdk/ios/System/Library/Frameworks/EventKit.framework/Headers/EKAlarm.h +114 -0
- package/sdk/ios/System/Library/Frameworks/EventKit.framework/Headers/EKCalendar.h +134 -0
- package/sdk/ios/System/Library/Frameworks/EventKit.framework/Headers/EKCalendarItem.h +129 -0
- package/sdk/ios/System/Library/Frameworks/EventKit.framework/Headers/EKError.h +105 -0
- package/sdk/ios/System/Library/Frameworks/EventKit.framework/Headers/EKEvent.h +205 -0
- package/sdk/ios/System/Library/Frameworks/EventKit.framework/Headers/EKEventStore.h +477 -0
- package/sdk/ios/System/Library/Frameworks/EventKit.framework/Headers/EKObject.h +34 -0
- package/sdk/ios/System/Library/Frameworks/EventKit.framework/Headers/EKParticipant.h +115 -0
- package/sdk/ios/System/Library/Frameworks/EventKit.framework/Headers/EKRecurrenceDayOfWeek.h +71 -0
- package/sdk/ios/System/Library/Frameworks/EventKit.framework/Headers/EKRecurrenceEnd.h +61 -0
- package/sdk/ios/System/Library/Frameworks/EventKit.framework/Headers/EKRecurrenceRule.h +193 -0
- package/sdk/ios/System/Library/Frameworks/EventKit.framework/Headers/EKReminder.h +80 -0
- package/sdk/ios/System/Library/Frameworks/EventKit.framework/Headers/EKSource.h +47 -0
- package/sdk/ios/System/Library/Frameworks/EventKit.framework/Headers/EKStructuredLocation.h +28 -0
- package/sdk/ios/System/Library/Frameworks/EventKit.framework/Headers/EKTypes.h +253 -0
- package/sdk/ios/System/Library/Frameworks/EventKit.framework/Headers/EKVirtualConferenceDescriptor.h +109 -0
- package/sdk/ios/System/Library/Frameworks/EventKit.framework/Headers/EKVirtualConferenceProvider.h +63 -0
- package/sdk/ios/System/Library/Frameworks/EventKit.framework/Headers/EventKit.apinotes +72 -0
- package/sdk/ios/System/Library/Frameworks/EventKit.framework/Headers/EventKit.h +29 -0
- package/sdk/ios/System/Library/Frameworks/EventKit.framework/Headers/EventKitDefines.h +30 -0
- package/sdk/ios/System/Library/Frameworks/EventKit.framework/Modules/module.modulemap +5 -0
- package/sdk/ios/System/Library/Frameworks/PushKit.framework/Headers/PKDefines.h +26 -0
- package/sdk/ios/System/Library/Frameworks/PushKit.framework/Headers/PKPushCredentials.h +37 -0
- package/sdk/ios/System/Library/Frameworks/PushKit.framework/Headers/PKPushPayload.h +36 -0
- package/sdk/ios/System/Library/Frameworks/PushKit.framework/Headers/PKPushRegistry.h +330 -0
- package/sdk/ios/System/Library/Frameworks/PushKit.framework/Headers/PKVoIPPushMetadata.h +27 -0
- package/sdk/ios/System/Library/Frameworks/PushKit.framework/Headers/PushKit.apinotes +43 -0
- package/sdk/ios/System/Library/Frameworks/PushKit.framework/Headers/PushKit.h +12 -0
- package/sdk/ios/System/Library/Frameworks/PushKit.framework/Modules/module.modulemap +6 -0
- package/sdk/ios/System/Library/Frameworks/QuickLook.framework/Headers/ARQuickLookPreviewItem.h +63 -0
- package/sdk/ios/System/Library/Frameworks/QuickLook.framework/Headers/QLBase.h +34 -0
- package/sdk/ios/System/Library/Frameworks/QuickLook.framework/Headers/QLFilePreviewRequest.h +32 -0
- package/sdk/ios/System/Library/Frameworks/QuickLook.framework/Headers/QLPreviewController.h +174 -0
- package/sdk/ios/System/Library/Frameworks/QuickLook.framework/Headers/QLPreviewItem.h +45 -0
- package/sdk/ios/System/Library/Frameworks/QuickLook.framework/Headers/QLPreviewProvider.h +27 -0
- package/sdk/ios/System/Library/Frameworks/QuickLook.framework/Headers/QLPreviewReply.h +106 -0
- package/sdk/ios/System/Library/Frameworks/QuickLook.framework/Headers/QLPreviewSceneActivationConfiguration.h +41 -0
- package/sdk/ios/System/Library/Frameworks/QuickLook.framework/Headers/QLPreviewingController.h +74 -0
- package/sdk/ios/System/Library/Frameworks/QuickLook.framework/Headers/QLThumbnailProvider.h +37 -0
- package/sdk/ios/System/Library/Frameworks/QuickLook.framework/Headers/QLThumbnailReply.h +67 -0
- package/sdk/ios/System/Library/Frameworks/QuickLook.framework/Headers/QLThumbnailRequest.h +33 -0
- package/sdk/ios/System/Library/Frameworks/QuickLook.framework/Headers/QuickLook.apinotes +35 -0
- package/sdk/ios/System/Library/Frameworks/QuickLook.framework/Headers/QuickLook.h +30 -0
- package/sdk/ios/System/Library/Frameworks/QuickLook.framework/Headers/QuickLookUICore.h +12 -0
- package/sdk/ios/System/Library/Frameworks/QuickLook.framework/Modules/module.modulemap +8 -0
- package/src/core-data-entity-classes.ts +316 -0
- package/src/swift-host.ts +12 -0
- package/src/turbo-source.ts +89 -11
|
@@ -0,0 +1,477 @@
|
|
|
1
|
+
//
|
|
2
|
+
// EKEventStore.h
|
|
3
|
+
// EventKit
|
|
4
|
+
//
|
|
5
|
+
// Copyright 2009-2010 Apple Inc. All rights reserved.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
#import <Foundation/Foundation.h>
|
|
9
|
+
#import <EventKit/EventKitDefines.h>
|
|
10
|
+
#import <EventKit/EKTypes.h>
|
|
11
|
+
|
|
12
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
13
|
+
|
|
14
|
+
@class EKCalendar, EKEvent, EKSource, EKReminder, EKCalendarItem;
|
|
15
|
+
|
|
16
|
+
/*!
|
|
17
|
+
@enum EKSpan
|
|
18
|
+
@abstract Values for controlling what occurrences to affect in a recurring event.
|
|
19
|
+
@discussion This enumerated type is used to indicate the scope of a change being made to a repeating event. EKSpanThisEvent
|
|
20
|
+
indicates the changes should apply only to this event, EKSpanFutureEvents indicates the changes should apply to
|
|
21
|
+
this event and all future events in the pattern.
|
|
22
|
+
@constant EKSpanThisEvent Affect this event only.
|
|
23
|
+
@constant EKSpanFutureEvents Affect this event and all after it.
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
typedef NS_ENUM(NSInteger, EKSpan) {
|
|
27
|
+
EKSpanThisEvent,
|
|
28
|
+
EKSpanFutureEvents
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
typedef void (^EKEventSearchCallback)(EKEvent *event, BOOL *stop);
|
|
33
|
+
|
|
34
|
+
/*!
|
|
35
|
+
@class EKEventStore
|
|
36
|
+
@abstract The EKEventStore class provides an interface for accessing and manipulating calendar events and reminders.
|
|
37
|
+
@discussion The EKEventStore class is the main point of contact for accessing Calendar data. You must
|
|
38
|
+
create a EKEventStore object in order to retrieve/add/delete events or reminders from the Calendar database.
|
|
39
|
+
|
|
40
|
+
Events, Reminders, and Calendar objects retrieved from an event store cannot be used with any other event
|
|
41
|
+
store. It is generally best to hold onto a long-lived instance of an event store, most
|
|
42
|
+
likely as a singleton instance in your application.
|
|
43
|
+
*/
|
|
44
|
+
NS_CLASS_AVAILABLE(10_8, 4_0)
|
|
45
|
+
@interface EKEventStore : NSObject
|
|
46
|
+
|
|
47
|
+
/*!
|
|
48
|
+
@method authorizationStatusForEntityType:
|
|
49
|
+
@discussion Returns the authorization status for the given entity type
|
|
50
|
+
*/
|
|
51
|
+
|
|
52
|
+
+ (EKAuthorizationStatus)authorizationStatusForEntityType:(EKEntityType)entityType NS_AVAILABLE(10_9, 6_0);
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
/*!
|
|
56
|
+
@method initWithAccessToEntityTypes:
|
|
57
|
+
@discussion Users are able to grant or deny access to event and reminder data on a per-app basis. To request access to
|
|
58
|
+
event and/or reminder data, instantiate an EKEventStore using this method. This call will not block the
|
|
59
|
+
program while the user is being asked to grant or deny access. Until access has been granted for an entity
|
|
60
|
+
type, this event store will not contain any calendars for that entity type, and any attempt to save entities
|
|
61
|
+
of that entity type will fail. If access is later granted or declined, the event store will broadcast an
|
|
62
|
+
EKEventStoreChangedNotification. You can check the current access status for an entity type
|
|
63
|
+
using +authorizationStatusForEntityType:. The user will only be prompted the first time access is requested; any
|
|
64
|
+
subsequent instantiations of EKEventStore will use the existing permissions.
|
|
65
|
+
@param entityTypes A bit mask of entity types to which you want access
|
|
66
|
+
*/
|
|
67
|
+
- (id)initWithAccessToEntityTypes:(EKEntityMask)entityTypes NS_DEPRECATED(10_8, 10_9, NA, NA);
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
/*!
|
|
71
|
+
@method init
|
|
72
|
+
*/
|
|
73
|
+
- (id)init NS_AVAILABLE(10_9, 4_0);
|
|
74
|
+
|
|
75
|
+
/*!
|
|
76
|
+
@method initWithSources:
|
|
77
|
+
@abstract Creates a new event store that only includes items and calendars for a subset of sources.
|
|
78
|
+
@param sources The sources you want this event store to recognize. This may include delegate sources.
|
|
79
|
+
*/
|
|
80
|
+
- (instancetype)initWithSources:(NSArray<EKSource *> *)sources NS_AVAILABLE(10_11, 16_0);
|
|
81
|
+
|
|
82
|
+
typedef void(^EKEventStoreRequestAccessCompletionHandler)(BOOL granted, NSError * __nullable error);
|
|
83
|
+
|
|
84
|
+
- (void)requestFullAccessToEventsWithCompletion:(EKEventStoreRequestAccessCompletionHandler)completion API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0));
|
|
85
|
+
|
|
86
|
+
- (void)requestWriteOnlyAccessToEventsWithCompletion:(EKEventStoreRequestAccessCompletionHandler)completion API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0));
|
|
87
|
+
|
|
88
|
+
- (void)requestFullAccessToRemindersWithCompletion:(EKEventStoreRequestAccessCompletionHandler)completion API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0));
|
|
89
|
+
|
|
90
|
+
- (void)requestAccessToEntityType:(EKEntityType)entityType completion:(EKEventStoreRequestAccessCompletionHandler)completion API_DEPRECATED("Use -requestFullAccessToEventsWithCompletion:, -requestWriteOnlyAccessToEventsWithCompletion:, or -requestFullAccessToRemindersWithCompletion:", ios(6.0, 17.0), macos(10.0, 14.0), watchos(1.0, 10.0));
|
|
91
|
+
|
|
92
|
+
/*!
|
|
93
|
+
@property eventStoreIdentifier
|
|
94
|
+
@abstract Returns a unique identifier string representing this calendar store.
|
|
95
|
+
*/
|
|
96
|
+
@property(nonatomic, readonly) NSString *eventStoreIdentifier;
|
|
97
|
+
|
|
98
|
+
//----------------------------------------------------
|
|
99
|
+
// SOURCES
|
|
100
|
+
//----------------------------------------------------
|
|
101
|
+
|
|
102
|
+
/*!
|
|
103
|
+
@property delegateSources
|
|
104
|
+
@abstract Returns an unordered array of sources for all available delegates.
|
|
105
|
+
*/
|
|
106
|
+
@property (nonatomic, readonly) NSArray<EKSource *> *delegateSources NS_AVAILABLE(10_11, 12_0);
|
|
107
|
+
|
|
108
|
+
/*!
|
|
109
|
+
@property sources
|
|
110
|
+
@abstract Returns an unordered array of sources.
|
|
111
|
+
*/
|
|
112
|
+
@property (nonatomic, readonly) NSArray<EKSource *> *sources NS_AVAILABLE(10_8, 5_0);
|
|
113
|
+
|
|
114
|
+
/*!
|
|
115
|
+
@method sourceWithIdentifier:
|
|
116
|
+
@abstract Returns a source with a specified identifier.
|
|
117
|
+
*/
|
|
118
|
+
- (nullable EKSource *)sourceWithIdentifier:(NSString *)identifier NS_AVAILABLE(10_8, 5_0);
|
|
119
|
+
|
|
120
|
+
//----------------------------------------------------
|
|
121
|
+
// CALENDARS
|
|
122
|
+
//----------------------------------------------------
|
|
123
|
+
|
|
124
|
+
/*!
|
|
125
|
+
@method calendars
|
|
126
|
+
@abstract While this returns an array, the calendars are unordered. This call is deprecated
|
|
127
|
+
and only returns calendars that support events. If you want reminder calendars
|
|
128
|
+
you should use calendarsForEntityType:
|
|
129
|
+
*/
|
|
130
|
+
@property(nonatomic, readonly) NSArray<EKCalendar *> *calendars NS_DEPRECATED(NA, NA, 4_0, 6_0)
|
|
131
|
+
#if defined(TARGET_OS_VISION) && TARGET_OS_VISION
|
|
132
|
+
API_UNAVAILABLE(visionos)
|
|
133
|
+
#endif
|
|
134
|
+
;
|
|
135
|
+
|
|
136
|
+
/*!
|
|
137
|
+
@method calendarsForEntityType
|
|
138
|
+
@abstract Returns calendars that support a given entity type (reminders, events)
|
|
139
|
+
*/
|
|
140
|
+
- (NSArray<EKCalendar *> *)calendarsForEntityType:(EKEntityType)entityType NS_AVAILABLE(10_8, 6_0);
|
|
141
|
+
|
|
142
|
+
/*!
|
|
143
|
+
@property defaultCalendarForNewEvents
|
|
144
|
+
@abstract Returns the calendar that events should be added to by default.
|
|
145
|
+
@discussion This may be nil if there is no default calendar for new events.
|
|
146
|
+
*/
|
|
147
|
+
@property(nullable, nonatomic, readonly) EKCalendar *defaultCalendarForNewEvents;
|
|
148
|
+
|
|
149
|
+
/*!
|
|
150
|
+
@method defaultCalendarForNewReminders
|
|
151
|
+
@abstract Returns the calendar that reminders should be added to by default.
|
|
152
|
+
@discussion This may be nil if there is no default calendar for new reminders.
|
|
153
|
+
*/
|
|
154
|
+
- (nullable EKCalendar *)defaultCalendarForNewReminders NS_AVAILABLE(10_8, 6_0);
|
|
155
|
+
|
|
156
|
+
/*!
|
|
157
|
+
@method calendarWithIdentifier:
|
|
158
|
+
@abstract Returns a calendar with a specified identifier.
|
|
159
|
+
*/
|
|
160
|
+
- (nullable EKCalendar *)calendarWithIdentifier:(NSString *)identifier NS_AVAILABLE(10_8, 5_0);
|
|
161
|
+
|
|
162
|
+
/*!
|
|
163
|
+
@method saveCalendar:commit:error:
|
|
164
|
+
@abstract Saves changes to a calendar, or adds a new calendar to the database.
|
|
165
|
+
@discussion This method attempts to save the given calendar to the calendar database. It
|
|
166
|
+
returns YES if successful and NO otherwise. Passing a calendar fetched from
|
|
167
|
+
another EKEventStore instance into this function will raise an exception.
|
|
168
|
+
On WatchOS, saving changes is not supported.
|
|
169
|
+
|
|
170
|
+
@param calendar The calendar to save.
|
|
171
|
+
@param commit Pass YES to cause the database to save. You can pass NO to save multiple
|
|
172
|
+
calendars and then call commit: to save them all at once.
|
|
173
|
+
@param error If an error occurs, this will contain a valid NSError object on exit.
|
|
174
|
+
*/
|
|
175
|
+
- (BOOL)saveCalendar:(EKCalendar *)calendar commit:(BOOL)commit error:(NSError **)error NS_AVAILABLE(10_8, 5_0) __WATCHOS_PROHIBITED;
|
|
176
|
+
|
|
177
|
+
/*!
|
|
178
|
+
@method removeCalendar:commit:error:
|
|
179
|
+
@abstract Removes a calendar from the database.
|
|
180
|
+
@discussion This method attempts to delete the given calendar from the calendar database. It
|
|
181
|
+
returns YES if successful and NO otherwise. Passing a calendar fetched from
|
|
182
|
+
another EKEventStore instance into this function will raise an exception.
|
|
183
|
+
|
|
184
|
+
If the calendar supports multiple entity types (allowedEntityTypes), but the user has
|
|
185
|
+
not granted you access to all those entity types, then we will delete all of the entity types
|
|
186
|
+
for which you have access and remove that entity type from the allowedEntityTypes.
|
|
187
|
+
For example: If a calendar supports both events and reminders, but you only have access to reminders,
|
|
188
|
+
we will delete all the reminders and make the calendar only support events.
|
|
189
|
+
|
|
190
|
+
If you have access to all of its allowedEntityTypes, then it will delete the calendar and
|
|
191
|
+
all of the events and reminders in the calendar.
|
|
192
|
+
|
|
193
|
+
On WatchOS, modifying the database is not supported.
|
|
194
|
+
|
|
195
|
+
@param calendar The calendar to delete.
|
|
196
|
+
@param commit Pass YES to cause the database to save. You can pass NO to batch multiple
|
|
197
|
+
changes and then call commit: to save them all at once.
|
|
198
|
+
@param error If an error occurs, this will contain a valid NSError object on exit.
|
|
199
|
+
*/
|
|
200
|
+
- (BOOL)removeCalendar:(EKCalendar *)calendar commit:(BOOL)commit error:(NSError **)error NS_AVAILABLE(10_8, 5_0) __WATCHOS_PROHIBITED;
|
|
201
|
+
|
|
202
|
+
//----------------------------------------------------
|
|
203
|
+
// CALENDAR ITEMS (apply to both reminders and events)
|
|
204
|
+
//----------------------------------------------------
|
|
205
|
+
|
|
206
|
+
/*!
|
|
207
|
+
@method calendarItemWithIdentifier:
|
|
208
|
+
@abstract Returns either a reminder or the first occurrence of an event.
|
|
209
|
+
*/
|
|
210
|
+
- (nullable EKCalendarItem *)calendarItemWithIdentifier:(NSString *)identifier NS_AVAILABLE(10_8, 6_0);
|
|
211
|
+
|
|
212
|
+
/*!
|
|
213
|
+
@method calendarItemsWithExternalIdentifier:
|
|
214
|
+
@abstract Returns either matching reminders or the first occurrences of any events matching
|
|
215
|
+
the given external identifier.
|
|
216
|
+
@discussion This method returns a set of EKEvents or EKReminders with the given external identifier.
|
|
217
|
+
Due to reasons discussed in -[EKCalendarItem calendarItemExternalIdentifier], there may be
|
|
218
|
+
more than one matching calendar item.
|
|
219
|
+
|
|
220
|
+
@param externalIdentifier The value obtained from EKCalendarItem's
|
|
221
|
+
calendarItemExternalIdentifier property
|
|
222
|
+
@result An unsorted array of EKCalendarItem instances
|
|
223
|
+
*/
|
|
224
|
+
- (NSArray<EKCalendarItem *> *)calendarItemsWithExternalIdentifier:(NSString *)externalIdentifier NS_AVAILABLE(10_8, 6_0);
|
|
225
|
+
|
|
226
|
+
//----------------------------------------------------
|
|
227
|
+
// EVENTS
|
|
228
|
+
//----------------------------------------------------
|
|
229
|
+
|
|
230
|
+
/*!
|
|
231
|
+
@method saveEvent:span:error:
|
|
232
|
+
@abstract Saves changes to an event permanently.
|
|
233
|
+
@discussion This method attempts to save the event to the calendar database. It returns YES if
|
|
234
|
+
successful and NO otherwise. It's possible for this method to return NO, and error
|
|
235
|
+
will be set to nil. This occurs if the event wasn't dirty and didn't need saving. This
|
|
236
|
+
means the correct way to detect failure is a result of NO and a non-nil error parameter.
|
|
237
|
+
Passing an event fetched from another EKEventStore instance into this function will
|
|
238
|
+
raise an exception.
|
|
239
|
+
|
|
240
|
+
After an event is successfully saved, it is also put into sync with the database, meaning
|
|
241
|
+
that all fields you did not change will be updated to the latest values. If you save the
|
|
242
|
+
event, but it was deleted by a different store/process, you will effectively recreate the
|
|
243
|
+
event as a new event.
|
|
244
|
+
|
|
245
|
+
On WatchOS, saving changes is not supported.
|
|
246
|
+
|
|
247
|
+
@param event The event to save.
|
|
248
|
+
@param span The span to use (this event, or this and future events).
|
|
249
|
+
@param error If an error occurs, this will contain a valid NSError object on exit.
|
|
250
|
+
*/
|
|
251
|
+
- (BOOL)saveEvent:(EKEvent *)event span:(EKSpan)span error:(NSError **)error NS_AVAILABLE(10_14, 4_0) __WATCHOS_PROHIBITED;
|
|
252
|
+
|
|
253
|
+
/*!
|
|
254
|
+
@method removeEvent:span:error:
|
|
255
|
+
@abstract Removes an event from the calendar store.
|
|
256
|
+
@discussion This method attempts to remove the event from the calendar database. It returns YES if
|
|
257
|
+
successful and NO otherwise. It's possible for this method to return NO, and error
|
|
258
|
+
will be set to nil. This occurs if the event wasn't ever added and didn't need removing. This
|
|
259
|
+
means the correct way to detect failure is a result of NO and a non-nil error parameter.
|
|
260
|
+
Passing an event from another CalendarStore into this function will raise an exception. After
|
|
261
|
+
an event is removed, it is no longer tied to this calendar store, and all data in the event
|
|
262
|
+
is cleared except for the eventIdentifier.
|
|
263
|
+
|
|
264
|
+
On WatchOS, modifying the database is not supported.
|
|
265
|
+
|
|
266
|
+
@param event The event to save.
|
|
267
|
+
@param span The span to use (this event, or this and future events).
|
|
268
|
+
@param error If an error occurs, this will contain a valid NSError object on exit.
|
|
269
|
+
*/
|
|
270
|
+
- (BOOL)removeEvent:(EKEvent *)event span:(EKSpan)span error:(NSError **)error NS_AVAILABLE(10_14, 4_0) __WATCHOS_PROHIBITED;
|
|
271
|
+
|
|
272
|
+
// These variants of the above allow you to batch changes by passing NO to commit. You can commit
|
|
273
|
+
// all changes later with [EKEventStore commit:]
|
|
274
|
+
- (BOOL)saveEvent:(EKEvent *)event span:(EKSpan)span commit:(BOOL)commit error:(NSError **)error NS_AVAILABLE(10_8, 5_0) __WATCHOS_PROHIBITED;
|
|
275
|
+
- (BOOL)removeEvent:(EKEvent *)event span:(EKSpan)span commit:(BOOL)commit error:(NSError **)error NS_AVAILABLE(10_8, 5_0) __WATCHOS_PROHIBITED;
|
|
276
|
+
|
|
277
|
+
/*!
|
|
278
|
+
@method eventWithIdentifier:
|
|
279
|
+
@abstract Returns the first occurrence of an event matching the given event identifier.
|
|
280
|
+
|
|
281
|
+
@param identifier The eventIdentifier to search for.
|
|
282
|
+
@result An EKEvent object, or nil if not found.
|
|
283
|
+
*/
|
|
284
|
+
- (nullable EKEvent *)eventWithIdentifier:(NSString *)identifier;
|
|
285
|
+
|
|
286
|
+
/*!
|
|
287
|
+
@method eventsMatchingPredicate:
|
|
288
|
+
@abstract Searches for events that match the given predicate.
|
|
289
|
+
@discussion This call executes a search for the events indicated by the predicate passed to it.
|
|
290
|
+
|
|
291
|
+
It is synchronous. If you want async behavior, you should either use dispatch_async or
|
|
292
|
+
NSOperation to run the query someplace other than the main thread, and then funnel the
|
|
293
|
+
array back to the main thread.
|
|
294
|
+
|
|
295
|
+
@param predicate The predicate to invoke. If this predicate was not created with the predicate
|
|
296
|
+
creation functions in this class, an exception is raised.
|
|
297
|
+
@result An array of EKEvent objects, or nil. There is no guaranteed order to the events.
|
|
298
|
+
*/
|
|
299
|
+
- (NSArray<EKEvent *> *)eventsMatchingPredicate:(NSPredicate *)predicate;
|
|
300
|
+
|
|
301
|
+
/*!
|
|
302
|
+
@method enumerateEventsMatchingPredicate:usingBlock:
|
|
303
|
+
@abstract Searches for events that match the given predicate.
|
|
304
|
+
@discussion This call executes a search for the events indicated by the predicate passed to it, calling
|
|
305
|
+
the block specified in the callback parameter for each event.
|
|
306
|
+
|
|
307
|
+
This method is synchronous. If you want async behavior, you should either use dispatch_async or
|
|
308
|
+
NSOperation to run the query someplace other than the main thread.
|
|
309
|
+
|
|
310
|
+
@param predicate The predicate to invoke. If this predicate was not created with the predicate
|
|
311
|
+
creation functions in this class, an exception is raised.
|
|
312
|
+
@param block The block to call for each event. Your block should return YES in the stop
|
|
313
|
+
parameter to stop iterating.
|
|
314
|
+
*/
|
|
315
|
+
- (void)enumerateEventsMatchingPredicate:(NSPredicate *)predicate usingBlock:(EKEventSearchCallback)block;
|
|
316
|
+
|
|
317
|
+
/*!
|
|
318
|
+
@method predicateForEventsWithStartDate:endDate:calendars:
|
|
319
|
+
@abstract Creates a predicate for use with eventsMatchingPredicate or enumerateEventsMatchingPredicate:usingBlock:.
|
|
320
|
+
@discussion Creates a simple query predicate to search for events within a certain date range. At present,
|
|
321
|
+
this will return events in the default time zone ([NSTimeZone defaultTimeZone]).
|
|
322
|
+
|
|
323
|
+
For performance reasons, this method will only return events within a four year timespan.
|
|
324
|
+
If the date range between the startDate and endDate is greater than four years, then it will be shortened
|
|
325
|
+
to the first four years.
|
|
326
|
+
|
|
327
|
+
@param startDate The start date.
|
|
328
|
+
@param endDate The end date.
|
|
329
|
+
@param calendars The calendars to search for events in, or nil to search all calendars.
|
|
330
|
+
*/
|
|
331
|
+
- (NSPredicate *)predicateForEventsWithStartDate:(NSDate *)startDate endDate:(NSDate *)endDate calendars:(nullable NSArray<EKCalendar *> *)calendars;
|
|
332
|
+
|
|
333
|
+
//----------------------------------------------------
|
|
334
|
+
// REMINDERS
|
|
335
|
+
//----------------------------------------------------
|
|
336
|
+
|
|
337
|
+
/*!
|
|
338
|
+
@method saveReminder:commit:error:
|
|
339
|
+
@abstract Saves changes to a reminder.
|
|
340
|
+
@discussion This method attempts to save the reminder to the event store database. It returns YES if
|
|
341
|
+
successful and NO otherwise. Passing a reminder fetched from another EKEventStore instance
|
|
342
|
+
into this function will raise an exception.
|
|
343
|
+
|
|
344
|
+
After a reminder is successfully saved, its fields are updated to the latest values in
|
|
345
|
+
the database.
|
|
346
|
+
|
|
347
|
+
On WatchOS, saving changes is not supported.
|
|
348
|
+
|
|
349
|
+
@param reminder The reminder to save.
|
|
350
|
+
@param commit Whether to save to the database or not. Pass NO to batch changes together and
|
|
351
|
+
commit with [EKEventStore commit:].
|
|
352
|
+
@param error If an error occurs, this will contain a valid NSError object on exit.
|
|
353
|
+
*/
|
|
354
|
+
- (BOOL)saveReminder:(EKReminder *)reminder commit:(BOOL)commit error:(NSError **)error NS_AVAILABLE(10_8, 6_0) __WATCHOS_PROHIBITED;
|
|
355
|
+
|
|
356
|
+
/*!
|
|
357
|
+
@method removeReminder:commit:error:
|
|
358
|
+
@abstract Removes a reminder from the event store.
|
|
359
|
+
@discussion This method attempts to remove the reminder from the event store database. It returns YES if
|
|
360
|
+
successful and NO otherwise. Passing a reminder from another EKEventStore into this function
|
|
361
|
+
will raise an exception. After a reminder is removed, it is no longer tied to this event store.
|
|
362
|
+
|
|
363
|
+
On WatchOS, modifying the database is not supported.
|
|
364
|
+
|
|
365
|
+
@param reminder The reminder to save.
|
|
366
|
+
@param commit Whether to save to the database or not. Pass NO to batch changes together and
|
|
367
|
+
commit with [EKEventStore commit:].
|
|
368
|
+
@param error If an error occurs, this will contain a valid NSError object on exit.
|
|
369
|
+
*/
|
|
370
|
+
- (BOOL)removeReminder:(EKReminder *)reminder commit:(BOOL)commit error:(NSError **)error NS_AVAILABLE(10_8, 6_0) __WATCHOS_PROHIBITED;
|
|
371
|
+
|
|
372
|
+
/*!
|
|
373
|
+
@method fetchRemindersMatchingPredicate:completion:
|
|
374
|
+
@abstract Fetches reminders asynchronously.
|
|
375
|
+
@discussion This method fetches reminders asynchronously and returns a value which can be
|
|
376
|
+
used in cancelFetchRequest: to cancel the request later if desired. The completion
|
|
377
|
+
block is called with an array of reminders that match the given predicate (or potentially nil).
|
|
378
|
+
*/
|
|
379
|
+
- (id)fetchRemindersMatchingPredicate:(NSPredicate *)predicate completion:(void (^)(NSArray<EKReminder *> * __nullable reminders))completion NS_AVAILABLE(10_8, 6_0);
|
|
380
|
+
|
|
381
|
+
/*!
|
|
382
|
+
@method cancelFetchRequest:
|
|
383
|
+
@discussion Given a value returned from fetchRemindersMatchingPredicate, this method can be used to
|
|
384
|
+
cancel the request. Once called, the completion block specified in fetchReminders... will
|
|
385
|
+
not be called.
|
|
386
|
+
*/
|
|
387
|
+
- (void)cancelFetchRequest:(id)fetchIdentifier NS_AVAILABLE(10_8, 6_0);
|
|
388
|
+
|
|
389
|
+
/*!
|
|
390
|
+
@method predicateForRemindersInCalendars:
|
|
391
|
+
@abstract Fetch all reminders in a set of calendars.
|
|
392
|
+
@discussion You can pass nil for calendars to fetch from all available calendars.
|
|
393
|
+
*/
|
|
394
|
+
- (NSPredicate *)predicateForRemindersInCalendars:(nullable NSArray<EKCalendar *> *)calendars NS_AVAILABLE(10_8, 6_0);
|
|
395
|
+
|
|
396
|
+
/*!
|
|
397
|
+
@method predicateForIncompleteRemindersWithDueDateStarting:ending:calendars:
|
|
398
|
+
@abstract Fetch incomplete reminders in a set of calendars.
|
|
399
|
+
@discussion You can use this method to search for incomplete reminders due in a range.
|
|
400
|
+
You can pass nil for start date to find all reminders due before endDate.
|
|
401
|
+
You can pass nil for both start and end date to get all incomplete reminders
|
|
402
|
+
in the specified calendars.
|
|
403
|
+
You can pass nil for calendars to fetch from all available calendars.
|
|
404
|
+
*/
|
|
405
|
+
- (NSPredicate *)predicateForIncompleteRemindersWithDueDateStarting:(nullable NSDate *)startDate ending:(nullable NSDate *)endDate calendars:(nullable NSArray<EKCalendar *> *)calendars NS_AVAILABLE(10_8, 6_0);
|
|
406
|
+
|
|
407
|
+
|
|
408
|
+
/*!
|
|
409
|
+
@method predicateForCompletedRemindersWithCompletionDateStarting:ending:calendars:
|
|
410
|
+
@abstract Fetch completed reminders in a set of calendars.
|
|
411
|
+
@discussion You can use this method to search for reminders completed between a range of dates.
|
|
412
|
+
You can pass nil for start date to find all reminders completed before endDate.
|
|
413
|
+
You can pass nil for both start and end date to get all completed reminders
|
|
414
|
+
in the specified calendars.
|
|
415
|
+
You can pass nil for calendars to fetch from all available calendars.
|
|
416
|
+
*/
|
|
417
|
+
- (NSPredicate *)predicateForCompletedRemindersWithCompletionDateStarting:(nullable NSDate *)startDate ending:(nullable NSDate *)endDate calendars:(nullable NSArray<EKCalendar *> *)calendars NS_AVAILABLE(10_8, 6_0);
|
|
418
|
+
|
|
419
|
+
//----------------------------------------------------
|
|
420
|
+
// COMMIT, RESET, ROLLBACK
|
|
421
|
+
//----------------------------------------------------
|
|
422
|
+
|
|
423
|
+
/*!
|
|
424
|
+
@method commit:
|
|
425
|
+
@abstract Commits pending changes to the database.
|
|
426
|
+
@discussion If you use saveCalendar/saveEvent/removeCalendar/removeEvent, etc. and you pass NO to their
|
|
427
|
+
parameter, you are batching changes for a later commit. This method does that commit. This
|
|
428
|
+
allows you to save the database only once for many additions or changes. If you pass
|
|
429
|
+
YES to methods' commit parameter, then you don't need to call this method.
|
|
430
|
+
|
|
431
|
+
This method will return YES as long as nothing went awry, even if nothing was actually
|
|
432
|
+
committed. If it returns NO, error should contain the reason it became unhappy.
|
|
433
|
+
|
|
434
|
+
On WatchOS, modifying the database is not supported.
|
|
435
|
+
*/
|
|
436
|
+
- (BOOL)commit:(NSError **)error NS_AVAILABLE(10_8, 5_0) __WATCHOS_PROHIBITED;
|
|
437
|
+
|
|
438
|
+
/*!
|
|
439
|
+
@method reset
|
|
440
|
+
@abstract Resets the event store.
|
|
441
|
+
@discussion You can use this method to forget ALL changes made to the event store (all additions, all
|
|
442
|
+
fetched objects, etc.). It essentially is as if you released the store and then created a
|
|
443
|
+
new one. It brings it back to its initial state. All objects ever created/fetched, etc.
|
|
444
|
+
using this store are no longer connected to it and are considered invalid.
|
|
445
|
+
*/
|
|
446
|
+
- (void)reset NS_AVAILABLE(10_8, 5_0);
|
|
447
|
+
|
|
448
|
+
/*!
|
|
449
|
+
@method refreshSourcesIfNecessary
|
|
450
|
+
@abstract Cause a sync to potentially occur taking into account the necessity of it.
|
|
451
|
+
@discussion You can call this method to pull new data from remote sources.
|
|
452
|
+
This only updates the event store's data. If you want to update your objects after
|
|
453
|
+
refreshing the sources, you should call refresh on each of them afterwards.
|
|
454
|
+
On iOS and macOS, this sync only occurs if deemed necessary.
|
|
455
|
+
On WatchOS, initiating sync is not available. Sync will occur automatically with the paired iOS device.
|
|
456
|
+
*/
|
|
457
|
+
- (void)refreshSourcesIfNecessary NS_AVAILABLE(10_8, 5_0) __WATCHOS_PROHIBITED;
|
|
458
|
+
|
|
459
|
+
@end
|
|
460
|
+
|
|
461
|
+
/*!
|
|
462
|
+
@constant EKEventStoreChangedNotification
|
|
463
|
+
@discussion Notification name sent out when the database is changed by either an external process,
|
|
464
|
+
another event store in the same process, or by calling saveEvent: or removeEvent: on a
|
|
465
|
+
store you are managing. When you receive this notification, you should consider all EKEvent
|
|
466
|
+
instances you have to be invalid. If you had selected events for a date range using
|
|
467
|
+
eventsMatchingPredicate, etc. for display, you should release them and re-fetch the events
|
|
468
|
+
again. If you have an event you are actively using (e.g. you are currently viewing details
|
|
469
|
+
for it or editing it), you can call [EKEvent refresh] to try to revalidate it against the
|
|
470
|
+
latest state of the database. If that method returns YES, you can continue to use the event,
|
|
471
|
+
otherwise, you should release it and abandon what you were doing with it. The view
|
|
472
|
+
controllers provided by EventKitUI automatically deal with this for you.
|
|
473
|
+
This notification will also be posted if access to events or reminders is changed by the user.
|
|
474
|
+
*/
|
|
475
|
+
EVENTKIT_EXTERN NSString *const EKEventStoreChangedNotification NS_AVAILABLE(10_8, 4_0);
|
|
476
|
+
|
|
477
|
+
NS_ASSUME_NONNULL_END
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
//
|
|
2
|
+
// EKObject.h
|
|
3
|
+
// EventKit
|
|
4
|
+
//
|
|
5
|
+
// Copyright 2011 Apple Inc. All rights reserved.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
#import <Foundation/Foundation.h>
|
|
9
|
+
|
|
10
|
+
NS_CLASS_AVAILABLE(10_8, 13_0)
|
|
11
|
+
@interface EKObject : NSObject
|
|
12
|
+
|
|
13
|
+
// Returns YES if this object or any sub-object (alarm, etc.) has uncommitted changes.
|
|
14
|
+
@property (nonatomic, readonly) BOOL hasChanges;
|
|
15
|
+
|
|
16
|
+
// Returns YES if this object has never been saved.
|
|
17
|
+
#if defined(__cplusplus)
|
|
18
|
+
- (BOOL)isNew;
|
|
19
|
+
#else
|
|
20
|
+
@property (nonatomic, readonly, getter=isNew) BOOL new;
|
|
21
|
+
#endif
|
|
22
|
+
|
|
23
|
+
// If this object is not new, this method will unload all loaded properties and clear any dirty state
|
|
24
|
+
- (void)reset;
|
|
25
|
+
|
|
26
|
+
// If this object is not new, this method will unload dirty state only.
|
|
27
|
+
- (void)rollback;
|
|
28
|
+
|
|
29
|
+
// Determines if the object is still valid (i.e. it still exists in the database), and unloads all
|
|
30
|
+
// properties that have not been modified. If this ever returns NO, it indicates the record was deleted
|
|
31
|
+
// and this instance should be discarded and no longer referenced.
|
|
32
|
+
- (BOOL)refresh;
|
|
33
|
+
|
|
34
|
+
@end
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
//
|
|
2
|
+
// EKParticipant.h
|
|
3
|
+
// EventKit
|
|
4
|
+
//
|
|
5
|
+
// Copyright 2009-2010 Apple Inc. All rights reserved.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
#import <EventKit/EventKitDefines.h>
|
|
9
|
+
#import <EventKit/EKObject.h>
|
|
10
|
+
#import <EventKit/EKTypes.h>
|
|
11
|
+
|
|
12
|
+
#if TARGET_OS_IPHONE
|
|
13
|
+
#if __has_include(<AddressBook/ABPerson.h>)
|
|
14
|
+
#import <AddressBook/ABPerson.h>
|
|
15
|
+
#endif
|
|
16
|
+
typedef CFTypeRef ABRecordRef API_DEPRECATED("use CNContact, CNGroup, or CNContainer", ios(2.0, 9.0));
|
|
17
|
+
typedef CFTypeRef ABAddressBookRef API_DEPRECATED("use CNContactStore", ios(2.0, 9.0));
|
|
18
|
+
#else
|
|
19
|
+
@class ABPerson, ABAddressBook;
|
|
20
|
+
#endif
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
24
|
+
|
|
25
|
+
#if !TARGET_OS_IPHONE
|
|
26
|
+
@class ABPerson, ABAddressBook;
|
|
27
|
+
#endif
|
|
28
|
+
|
|
29
|
+
/*!
|
|
30
|
+
@class EKParticipant
|
|
31
|
+
@abstract Abstract class representing a participant attached to an event.
|
|
32
|
+
*/
|
|
33
|
+
NS_CLASS_AVAILABLE(10_8, 4_0)
|
|
34
|
+
@interface EKParticipant : EKObject <NSCopying> {
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/*!
|
|
38
|
+
@property url
|
|
39
|
+
@abstract URL representing this participant.
|
|
40
|
+
*/
|
|
41
|
+
@property(nonatomic, readonly) NSURL *URL;
|
|
42
|
+
|
|
43
|
+
/*!
|
|
44
|
+
@property name
|
|
45
|
+
@abstract Name of this participant.
|
|
46
|
+
*/
|
|
47
|
+
@property(nonatomic, readonly, nullable) NSString *name;
|
|
48
|
+
|
|
49
|
+
/*!
|
|
50
|
+
@property participantStatus
|
|
51
|
+
@abstract The status of the attendee.
|
|
52
|
+
@discussion Returns the status of the attendee as a EKParticipantStatus value.
|
|
53
|
+
*/
|
|
54
|
+
@property(nonatomic, readonly) EKParticipantStatus participantStatus;
|
|
55
|
+
|
|
56
|
+
/*!
|
|
57
|
+
@property participantRole
|
|
58
|
+
@abstract The role of the attendee.
|
|
59
|
+
@discussion Returns the role of the attendee as a EKParticipantRole value.
|
|
60
|
+
*/
|
|
61
|
+
@property(nonatomic, readonly) EKParticipantRole participantRole;
|
|
62
|
+
|
|
63
|
+
/*!
|
|
64
|
+
@property participantType
|
|
65
|
+
@abstract The type of the attendee.
|
|
66
|
+
@discussion Returns the type of the attendee as a EKParticipantType value.
|
|
67
|
+
*/
|
|
68
|
+
@property(nonatomic, readonly) EKParticipantType participantType;
|
|
69
|
+
|
|
70
|
+
/*!
|
|
71
|
+
@property currentUser
|
|
72
|
+
@abstract A boolean indicating whether this participant represents the
|
|
73
|
+
owner of this account.
|
|
74
|
+
*/
|
|
75
|
+
@property(nonatomic, readonly, getter=isCurrentUser) BOOL currentUser NS_AVAILABLE(10_9, 6_0);
|
|
76
|
+
|
|
77
|
+
/*!
|
|
78
|
+
@method contactPredicate
|
|
79
|
+
@abstract Returns a predicate to use with Contacts.framework to retrieve the corresponding
|
|
80
|
+
CNContact instance.
|
|
81
|
+
@discussion This method returns a predicate that can be used with a CNContactStore to fetch
|
|
82
|
+
a CNContact instance for this participant, if one exists.
|
|
83
|
+
*/
|
|
84
|
+
@property(nonatomic, readonly) NSPredicate *contactPredicate NS_AVAILABLE(10_11, 9_0);
|
|
85
|
+
|
|
86
|
+
#if TARGET_OS_IPHONE
|
|
87
|
+
/*!
|
|
88
|
+
@method ABRecordWithAddressBook
|
|
89
|
+
@abstract Returns the ABRecordRef that represents this participant.
|
|
90
|
+
@discussion This method returns the ABRecordRef that represents this participant,
|
|
91
|
+
if a match can be found based on email address in the address book
|
|
92
|
+
passed. If we cannot find the participant, nil is returned.
|
|
93
|
+
*/
|
|
94
|
+
|
|
95
|
+
- (nullable ABRecordRef)ABRecordWithAddressBook:(ABAddressBookRef)addressBook API_AVAILABLE(ios(4.0), macCatalyst(14.0)) API_DEPRECATED("Use contactPredicate instead", ios(4.0, 9.0)) API_UNAVAILABLE(watchos)
|
|
96
|
+
#if defined(TARGET_OS_VISION) && TARGET_OS_VISION
|
|
97
|
+
API_UNAVAILABLE(visionos)
|
|
98
|
+
#endif
|
|
99
|
+
CF_RETURNS_NOT_RETAINED;
|
|
100
|
+
|
|
101
|
+
#else
|
|
102
|
+
/*!
|
|
103
|
+
@method ABPersonInAddressBook
|
|
104
|
+
@abstract Returns the ABPerson that represents this participant.
|
|
105
|
+
@discussion This method returns the ABPerson that represents this participant,
|
|
106
|
+
if a match can be found based on email address in the address book
|
|
107
|
+
passed. If we cannot find the participant, nil is returned.
|
|
108
|
+
*/
|
|
109
|
+
- (nullable ABPerson *)ABPersonInAddressBook:(ABAddressBook *)addressBook NS_DEPRECATED_MAC(10_8, 10_11, "Use contactPredicate instead");
|
|
110
|
+
#endif
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
@end
|
|
114
|
+
|
|
115
|
+
NS_ASSUME_NONNULL_END
|