ekcalendar

Swift 4 How to get all events from calendar?

橙三吉。 提交于 2019-12-06 09:38:39
问题 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

URL scheme for opening native calendar with specific event id

﹥>﹥吖頭↗ 提交于 2019-12-05 12:33:14
问题 At first, I knew there is no public APIs for this approach. Tapping an event from iOS8 native calendar widget launches calendar with specific event. So, I can guess that there must be a URL scheme for it. Because widget and calendar works on each sand box, So, the NSURL must be used. I found a some clues from iPhoneDevWiki.net. It says that calshow:x?eventid=id is an URL scheme that opens specific event, and it is used by SpringBoard . Since the value of the id param is not described clear,

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

URL scheme for opening native calendar with specific event id

杀马特。学长 韩版系。学妹 提交于 2019-12-03 23:49:24
At first, I knew there is no public APIs for this approach. Tapping an event from iOS8 native calendar widget launches calendar with specific event. So, I can guess that there must be a URL scheme for it. Because widget and calendar works on each sand box, So, the NSURL must be used. I found a some clues from iPhoneDevWiki.net . It says that calshow:x?eventid=id is an URL scheme that opens specific event, and it is used by SpringBoard . Since the value of the id param is not described clear, So, I have tested this url scheme with: EKEvent.calendarItemIdentifier EKEvent