I'm trying to find a way to retrieve the email account associated to calendar events on the Mac. Is there a way to do that?
I tried looking in to the EKEvent object and it does not indicate the email account. I also tried looking in to the ACAccountStore.
EventKit
RSS for tagCreate, view, and edit calendar and reminder events using EventKit and EventKitUI. Request read-only, write-only, or full-access to Calendar data.
Posts under EventKit tag
43 Posts
Sort by:
Post
Replies
Boosts
Views
Activity
We use Eventkit Framework to synchronize the meeting calendar to the system calendar, read the System Calendar with -[EKEventStore calendarsForEntityType:], Use - [EKEventStore saveEvent: span: commit: error:] wrote system calendar. This usage currently triggers the Contacts Permission Alert on a user. Through the log, we identified no use - [CNContactStore requestAccessForEntityType: completionHandler:] and Contacts API.
on iOS16.4, if try to add EKAttendee on EKEvent, it will cause app crash; this can not reproduce on iOS14.5/iOS15.7 etc low version.
Add Main example Attendee code:
Class className = NSClassFromString(@"EKAttendee");
NSMutableArray *attendeessystem = [NSMutableArray new];
for(int i=0; I<1;i++){
id attendee = [className new];
[attendee setValue:@"test" forKey:@"firstName"];
[attendee setValue:@"hihi" forKey:@"lastName"];
[attendee setValue:@"test@outlook.com" forKey:@"emailAddress"];
[attendeessystem addObject:attendee];
}
if([attendeessystem count]>0)
{
[calendarEvent setValue:attendeessystem forKey:@"attendees"];
}
crash log:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSDictionaryM setObject:forKeyedSubscript:]: key cannot be nil'
*** First throw call stack: