简体   繁体   English

EKReminder属性存储联系电话号码

[英]EKReminder property storing contact phone number

My iOS app reads EKReminders created by the native Reminders app or by Siri. 我的iOS应用程序读取由本机Reminders应用程序或Siri创建的EKReminders

I have access to the EKEventStore and I can successfully read Reminders and their details, such as title, alarms, priority and if it is a location-triggered alarm. 我可以访问EKEventStore ,我可以成功读取提醒及其详细信息,例如标题,警报,优先级以及是否是位置触发的警报。

What I'm not able to do is read the contact / phone number associated with the Reminder : I can tell Siri to remind me to call my sister, she asks me to pick one of the saved number and then, in Reminders.app, the new reminder title is underlined like a link; 我无法做的是阅读与提醒相关联的联系人/电话号码 :我可以告诉Siri提醒我打电话给我的妹妹,她要我选择一个已保存的号码,然后在Reminders.app中,新的提醒标题加下划线,如链接; if I tap it, an alert to start the call appears or, if I set a due date, when the reminder is due the notification has an action to start the call right away. 如果我点击它,则会出现启动呼叫的提示,或者,如果我设置截止日期,则提醒到期时通知会立即启动呼叫。

I suppose the EKReminder has a property (like .structuredLocation stores the address) for the associated contact or the phone number, but I haven't been able to find it in the documentation or by searching Google. 我想EKReminder有一个属性(如.structuredLocation存储地址)用于关联的联系人或电话号码,但我无法在文档中或通过搜索Google找到它。

Someone knows how to get the contact, or the phone number or, at lease, if there's a phone number associated with that Reminder (it would be enough for me: I will not import any reminders with phone numbers, but I don't need to know the actual number to avoid importation, it would be enough to know that a number had been selected by user)? 有人知道如何获得联系人或电话号码,或者至少是否有与该提醒相关联的电话号码(这对我来说已经足够了:我不会导入任何带有电话号码的提醒,但我不需要要知道实际的数字以避免输入,就足以知道用户已经选择了一个数字)?

Thanks in advance, 提前致谢,

@cdf1982 @ cdf1982

Actually EKEvent has such a property: 实际上EKEvent有这样一个属性:

@available(OSX 10.11, *)
@NSCopying public var structuredLocation: EKStructuredLocation?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM