0

I'm about to embark on an app that will require scheduling of events for "clients" among other things. I've worked with ABAddressBook a bit on a previous project (year ago) so knew then its advantages & limitations. No experience with Event Kit.

I believe Apple says if you rely on these frameworks (and data sources) you should only store the ABRecordID or eventIdentifier in your application...then in the future you'd retrieve the address book object (or the event object) and compare them to some local data before proceeding?!?

So, if I want to list all a user's clients in the app i'd first build an array of client objects (that contain the full name and an ABRecordID for each client) then fetch each ABRecordID from AddressBook and compare the full name to what I've stored locally and only THEN display each client's name in the table view?

This seems cumbersome...and I haven't even started with the calendar (though EKEventKit docs are light on this info). Is this considered reliable?

Anyone have any advice before I embark along this path?

4

1 回答 1

0

我做了类似的事情。我确实将它存储eventIdentifier在设备上,然后用它来获取事件。这是有风险的,因为文档指出如果事件的日历发生变化,则 eventIdentifier 属性很可能也会发生变化。似乎没有一种“合理”的方法来存储以编程方式创建的日期并在将来获取它。

于 2010-11-24T14:28:10.147 回答