[英]How to get assignment of a reminder (EKReminder) in iOS?
[Update: I submitted an official Apple Developer feedback request for an update to the EventKit API and documentation] [更新:我提交了 Apple 开发者官方反馈请求,要求更新 EventKit API 和文档]
[Update: I contacted Apple Support and they said to read the docs...so I think Matt is correct, It is simply not available.] [更新:我联系了 Apple 支持,他们说要阅读文档……所以我认为 Matt 是正确的,它根本不可用。]
According to Apple Docs , the EKReminder is a subclass of EKCalendarItem.根据Apple Docs ,EKReminder 是 EKCalendarItem 的子类。 It has the following (lot) of properties:
它具有以下(很多)属性:
As a reminder:提醒一句:
As a calendar item:作为日历项目:
I can print any one of these items from reminders in my app.我可以从我的应用程序的提醒中打印这些项目中的任何一项。
However, if I create a reminder that is "assigned to a person", I cannot get that information.但是,如果我创建一个“分配给某人”的提醒,我将无法获得该信息。 I know it must be stored somewhere.
我知道它必须存放在某个地方。
If you "print" a reminder, you get something like this:如果你“打印”一个提醒,你会得到这样的东西:
EKReminder <0x0000000> {title = Do the thing; dueDate = 2021-02-25 08:00:00 +0000; completionDate = (null); priority = 0; calendarItemIdentifier = XXXXX-XXXX-XXXX-XXXX-XXXXXX; alarms = (null)}
If you want, you can "print" any of the other items, like print(reminder.notes!)
.如果需要,您可以“打印”任何其他项目,例如
print(reminder.notes!)
。
I thought shared items and assignments might use the attendees
property, but it is nil - even when the reminder has an assigned person.我认为共享项目和作业可能会使用
attendees
属性,但它是 nil - 即使提醒有指定的人。
How can you get to the assigned person?你怎么能找到指定的人?
This is probably a feature of upgraded reminders.这可能是升级提醒的一个功能。 But the API was never upgraded to match, so there's no programmatic access to it.
但是 API 从未升级为匹配,因此无法以编程方式访问它。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.