当 queryForEventsListWithCalendarId 返回所有事件但重复任务返回 recurrence = nil 和 recurringEventId = id 如何获取重复规则以了解此事件是否每天、每周或每月重复
func fetchEvents(){
let query = GTLQueryCalendar.queryForEventsListWithCalendarId("primary")
query.maxResults = 30
query.timeMin = NSDate()
query.singleEvents = true
query.orderBy = kGTLCalendarOrderByStartTime
service.executeQuery(
query,
delegate: self,
didFinishSelector: "displayResultWithTicket:finishedWithObject:error:"
)
}
最佳答案
在尝试了所有查询后,我终于找到了答案,我发现以“每日 - 每周 - 每月”的重复模式获取事件我应该使用以下查询
let query = GTLQueryCalendar.queryForEventsListWithCalendarId("primary")
关于ios - Google Calendar API 在返回 recurringEventId 时 swift 返回 recurrence = nil,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37556366/