我目前正在阅读功能类似于此处描述的所有日历事件:https ://www.andrewcbancroft.com/2016/04/28/listing-calendar-events-with-event-kit-and-swift/
IE
// 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 日历)会显示它们。
这个怎么可能?