eventkit

URL Scheme for opening the iCal app at a date or event?

瘦欲@ 提交于 2019-12-04 12:07:08
The Apple URL Scheme Reference gives a nice overview of a number of URL schemes you can use to open certain built-in apps with some parameters. I know that this is not a complete list of all possible URL schemes that the built-in apps respond to, since there are also ways to open the system settings at various pages. The website http://handleopenurl.com is a nice attempt at gathering all possible URL schemes and it has quite a few built-in apps on there. One app I would like to open with a URL scheme is the Calendar app (formerly known as iCal). But is there a scheme? If you know there is,

Add a new calendar to an EKEventStore with EventKit [closed]

送分小仙女□ 提交于 2019-12-04 11:43:13
How can I add a Calendar (not an event) to a EKEventStore in iOS 5? I caught an exception unless I also did: // Get the calendar source EKSource* localSource; for (EKSource* source in eventStore.sources) { if (source.sourceType == EKSourceTypeLocal) { localSource = source; break; } } if (!localSource) return; calendar = [EKCalendar calendarWithEventStore:eventStore]; calendar.source = localSource; Naturally, take a look at the other EKSourceType enums to see which one is appropriate for your needs. EKEventStore *calendarStore = [[EKEventStore alloc] init]; EKCalendar *calendar = [EKCalendar

EKEvent eventIdentifier returns null

和自甴很熟 提交于 2019-12-04 06:06:20
When I try to get the identifier of an EKEvent, all I get is a nil value. Since in iOS5 EKEvent is a subclass of EKCalendarItem, I figured I might be able to get the EKCalendarItem's UUID, but that returns nil as well. Every now and then I also get this error while trying to access the identifier or UUID property: CADObjectGetInlineStringProperty failed fetching uniqueID for EKPersistentEvent with error Error Domain=NSMachErrorDomain Code=268435459 "The operation couldn’t be completed. (Mach error 268435459 - (ipc/send) invalid destination port)" I've been stuck on this problem for quite some

How to fix EKErrorDomain Code=1 "No calendar has been set

冷暖自知 提交于 2019-12-04 03:20:07
问题 I want to create a calendar entry to the iPhone calendar, I have tried the following code EKEventStore *eventStore = [[EKEventStore alloc] init]; EKEvent *event = [EKEvent eventWithEventStore:eventStore]; event.title = self.selectedPost.postTitle; event.notes = self.selectedPost.postContent; event.startDate = self.selectedPost.startDate; event.endDate = self.selectedPost.endDate; EKCalendar *targetCalendar = nil; targetCalendar = [eventStore defaultCalendarForNewEvents]; NSLog(@"%@"

EKParticipant in EventKit erroneously returns NO for isCurrentUser property

删除回忆录丶 提交于 2019-12-03 10:31:34
I'm attempting to determine which of an EKEvent's attendees ( EKPartipants ) is the current user. In iOS6, EKParticipant exposes a property called isCurrentUser http://developer.apple.com/library/ios/#documentation/EventKit/Reference/EKParticipantClassRef/Reference/Reference.html#//apple_ref/occ/cl/EKParticipant which is supposed to provide precisely this information. Unfortunately, each time I lookup an EKParticipant's isCurrentUser property, it returns NO, even when that's clearly not the case. Any help would be much appreciated! Updated findings: If you look up the event organizer, it

What exactly constitutes a “full calendar sync” in EKCalendar?

青春壹個敷衍的年華 提交于 2019-12-03 01:29:46
The documentation for the EKCalendar class states this for the calendarIdentifier property: A full sync with the calendar will lose this identifier. You should have a plan for dealing with a calendar whose identifier is no longer fetch-able by caching its other properties. When exactly does a "full sync" occur and what properties are liable to change besides the calendarIdentifier ? When exactly does a "full sync" occur? Calendar and Reminders Programming Guide explains this questions in this way: If a change to the Calendar database occurs from outside of your app, Event Kit is able to detect

EKEventStoreChangedNotification not firing

左心房为你撑大大i 提交于 2019-12-01 23:37:34
问题 So I'm currently playing around with EventKit and was trying to get the EKEventStoreChangedNotification to fire when I add/modify/delete calendar entries in the native Calendar app, but after asking permission to access the Calendar, confirming that I'm authorized and signing up for the notification with [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(storeChanged:) name:EKEventStoreChangedNotification object:nil]; the selector is never called. Also tried the block

How to access an EKCalendar's `account` property

拈花ヽ惹草 提交于 2019-12-01 21:39:23
问题 Take a look at the documentation for EKCalendar. It's pretty simple, it has five properties, only one of which is a string called title . Now if you have multiple calendars on your iPhone and you open iCal's Calendar settings, you can see that all calendars are nicely grouped by another string called account . What I can't figure out, is how to do the same, because although you can see the account when you NSLog a EKCalendar instance, you can't access it: EKCalendar <0x1851b0> {title = Work;

XCode: Why is my event not being added to the calendar?

非 Y 不嫁゛ 提交于 2019-12-01 17:16:53
问题 I have added the following code to my app: NSDate * selected = [DatePicker date]; NSString * date = [selected description]; NSDateComponents *components = [[NSCalendar currentCalendar] components:NSDayCalendarUnit fromDate:DatePicker.date]; CalLabel1.text = [NSString stringWithFormat:@"%d", [components day]]; EKEventStore *store = [[EKEventStore alloc] init]; EKEvent *event = [EKEvent eventWithEventStore:store]; event.title = @"Test Event"; //required event.startDate = [DatePicker date];

iOS EventKit - Event is not being deleted from calendar

痞子三分冷 提交于 2019-12-01 11:12:55
I'm deleting event using the following code [store requestAccessToEntityType:EKEntityTypeEvent completion: ^(BOOL granted, NSError *error) { if (granted) { EKEvent *event = [store eventWithIdentifier:eventIdentifier]; NSError *eventDeleteError = nil; if (event) { [store removeEvent:event span:EKSpanThisEvent error:&eventDeleteError]; } if (eventDeleteError) { NSLog(@"Event Deletion Error: %@", eventDeleteError); } }]; I got no error in eventDeleteError but following message appear in the console log CADObjectGetInlineStringProperty failed fetching UUID for EKPersistentAttendee with error Error