eventkit

EKCalendarChooser multiple selection does not work

我的梦境 提交于 2019-12-05 15:43:57
I'm trying to use EKCalendarChooser to get multiple calendars selected by the user. This is how I present the view: EKCalendarChooser* dvc= [[[EKCalendarChooser alloc] initWithSelectionStyle:EKCalendarChooserSelectionStyleMultiple displayStyle:EKCalendarChooserDisplayAllCalendars eventStore:eventStore] autorelease]; dvc.selectedCalendars= self.selectedCalendars; dvc.delegate= self; dvc.contentSizeForViewInPopover= CGSizeMake(320.0, 480.0); self.popOver= [[UIPopoverController alloc] initWithContentViewController:dvc]; [self.popOver release]; self.popOver.delegate= self; UIBarButtonItem* item=

Reorder EKReminder in a list

浪尽此生 提交于 2019-12-05 15:06:25
Is it possible to reorder EKReminders in EKCalendar of type reminders? In native Reminders app it is possible, but I can't seem to find this option in the API. So, EKCalendarItem objects have calendarItemExternalIdentifier which is unique to the event across devices. You can use this to your advantage for this ordering strategy. Every time you fetch events from the calendar API, keep track of their calendarItemExternalIdentifier in whatever persistence store you choose (Core Data, SQLite, Property Lists, etc...) and also keep track of it's order. So if you used Core Data you might have an

How to use requestAccessToEntityType method in Swift iOS 8

我们两清 提交于 2019-12-05 13:07:13
I'm trying to get a list of events by using EKEventStore using Swift in iOS8, and the documentation is not updated yet as far as I can tell. This is what I'm trying to do: let eventStore = EKEventStore() eventStore.requestAccessToEntityType(EKEntityType(), EKEventStoreRequestAccessCompletionHandler(Bool(), NSError(){})) This is the error I get: 'EKEventStoreRequestAccessCompletionHandler' is not constructible with '(Bool, NSError) Do you know how can I use the method or the handler correctly in Swift? Try this please: func handler(granted: Bool, error: NSError!) { // put your handler code here

How to decide whether the default EKCalendar 'Calendar' can be hidden?

ⅰ亾dé卋堺 提交于 2019-12-05 03:25:11
I'm writing an app that deals with calendars. In the app I'm displaying a list of all available calendars for the user to enable or disable. I'm not using the EventKitUI framework for purposes of my own design and UI. I get a neat list of calendars by polling the calendars property of an EKEventStore object. On my device, however, there's an EKCalendar object in that list that is not shown by the EKEventKitUI . This is a description of the object in the debugger: EKCalendar <0xcea6b60> {title = Agenda; type = Local; allowsModify = YES; color = #711A76;} I'm running my iPhone in Dutch, which is

Creating an EKCalendar in EKEventStore - Swift

我与影子孤独终老i 提交于 2019-12-04 19:47:01
I'm trying to create a single calendar into EKEventStore when the my app first runs. I found this tutorial but I don't really know enough about Objective-C to translate it to Swift, and also from the research that I've done I'm wondering if this method is still possible in ios8. Try (note this is for a reminder type, but you can just change the type if you need to): let eventStore = EKEventStore() var yourReminderCalendar: EKCalendar? func retrieveYourCalendar() { let calendars = eventStore.calendarsForEntityType(EKEntityTypeReminder) if(yourReminderCalendar == nil) { for calendar in calendars

How to open calendar with event - NSURL calshow:

无人久伴 提交于 2019-12-04 18:01:23
问题 I'm wondering if there is someone who knows how to launch calendar with a specific event from APP I've done some research and I've come up with two ways to open native calendar from inside the app using NSURL "calshow://" which opens calendar at current date "calshow:\(someNSDate.timeIntervalSinceReferenceDate)" which opens calendar with date of someNSDate I also found this website that lists calshow:x?eventid=id as url but I'm not sure if this works (listed as not public) and I couldn't get

iOS – Event Kit programming listen to notifications

﹥>﹥吖頭↗ 提交于 2019-12-04 17:41:43
I want to observe changes to the Calendar application so I register for the EKEventStoreChangedNotification notification. But do I need to have an EKEventStore object "alive" for me to receive this notification? I'm thinking I'm initializing the EKEventStore object in on view controller to retrieve some events. And then I will pop this view controller of the navigation stack and the view controller will be deallocated thus the EKEventStore object will be deallocated. No, you don't need to keep the EKEventStore object alive as you are already registering EKEventStoreChangedNotification using

Swift 4 How to get all events from calendar?

无人久伴 提交于 2019-12-04 16:42:26
I am using Swift 4.1. And I want to write a function which will collect all events from all calendars in Calendar app of iOS. Thanks to this answer on stackoverflow: How to get all Events out of a Calendar (Swift) I was able to write my own class and call it Cale . Please, look at this: import UIKit import EventKit class Cale { private func createDate(year: Int) -> Date { var components = DateComponents() components.year = year components.timeZone = TimeZone(secondsFromGMT: 0) return Calendar.current.date(from: components)! } private let eventStore = EKEventStore() private func get() { let

EventKit in Universal app (OS3.2)

柔情痞子 提交于 2019-12-04 16:10:39
I made iPhone app with eventkit framework. However, i upgrade to universal app, app can't run in ipad. I got error message dyld: Library not loaded: /System/Library/Frameworks/EventKit.framework/EventKit Yes, event kit only work for iOS 4.0 or later. So, how to make it for universal. I want to make , if iPad app, don't use event kit framework. However, I can't add #import <EventKit/EventKit.h> #import <EventKitUI/EventKitUI.h> in run time You need to do two things: First, weak link against the EventKit framework. You do this in Target->Get Info->General. Secondly, you need to decide at run

Adding EKParticipants to an EKEvent in EventKit

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-04 16:00:02
问题 I'd like to programatically add a participant to an EKEvent on the iPhone. EKParticipant's class reference states "You do not create EKParticipant objects directly. Send attendees to an EKEvent object to get an array of EKParticipant objects.". EKEvent's class reference states that the 'attendees' member (NSArray) is "The attendees associated with the event, as an array of EKParticipant objects. (read-only)" Seems like a chicken-and-egg scenario - how does one "Send attendees to an EKEvent