Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
创建 EKCalendar 后,通常会说您应该保留 calendarIdentifier 以便稍后检索该日历。但是,文档指出,如果/当执行完整的日历同步时,标识符将会改变,并且“你应该有一个计划”来处理它。
处理这个问题的首选或“标准”方法是什么?
从文档
与日历完全同步将丢失此标识符。你应该有一个计划来处理一个日历,它的标识符不再可以通过缓存它的其他属性来获取。
不确定是否有任何“标准”的处理方式。但是保留它的标识符source是处理它的一种方法。日历一旦创建就不会更改,sourceIdentifier并且日历不能移动到不同的源。
source
sourceIdentifier