【发布时间】:2018-12-17 16:20:37
【问题描述】:
我目前正在阅读所有日历事件,其功能类似于此处所述:https://www.andrewcbancroft.com/2016/04/28/listing-calendar-events-with-event-kit-and-swift/
即
// Use an event store instance to create and properly configure an NSPredicate
let eventsPredicate = eventStore.predicateForEventsWithStartDate(startDate, endDate: endDate, calendars: [calendar])
// Use the configured NSPredicate to find and return events in the store that match
self.events = eventStore.eventsMatchingPredicate(eventsPredicate).sort(){
(e1: EKEvent, e2: EKEvent) -> Bool in
return e1.startDate.compare(e2.startDate) == NSComparisonResult.OrderedAscending
}
现在,在我运行 iOS 12.1.1 的 iPhone X 上,这为我提供了一个名为“发现自然语言”的日历中的各种事件。我知道那些应该是 Siri 在邮件等应用程序中发现的事件。我在 iPhone 设置 -> 日历下打开了这个选项。然而,奇怪的是苹果的 iOS 日历并没有显示这些事件,即使通过 Siri 找到的日历是打开的。某些日历应用程序(例如 Fantastical)也不会显示它们,而其他一些应用程序(例如Vantage 日历显示它们。
怎么可能?
【问题讨论】:
-
同样的问题;你找到解决办法了吗?
标签: swift calendar ekevent ekcalendar