我想知道是否有人知道如何使用APP的特定事件启动日历
我已经完成了一些研究,并且我已经提出了两种使用NSURL从应用程序内部打开本机日历的方法
"calshow://"
在当前日期打开日历"calshow:\(someNSDate.timeIntervalSinceReferenceDate)"
打开日期为的日历someNSDate
我也找到了 这个网站 列出 calshow:x?eventid=id
作为网址,但我不确定这是否有效(列为非公开),我无法让自己工作,尝试使用:
event.calendarItemExternalIdentifier
event.eventIdentifier
event.calendarItemIdentifier
目前我正在使用此代码在finalInterval日期,事件日期打开日历应用程序
if let day = hackathon?.start {
let today = NSDate()
let timeSince = NSDate.timeIntervalSinceReferenceDate() // this plus
let todayToFutureDate = day.timeIntervalSinceDate(today)
let finalInterval = todayToFutureDate + timeSince
UIApplication.sharedApplication().openURL(NSURL(string: "calshow:\(finalInterval)")!)
}
我想要做的是打开日历,其中包含事件ID或类似事件的日历
如果您对更多信息有任何疑问,请问,我会在附近