3

My iOS app reads EKReminders created by the native Reminders app or by Siri.

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.

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; 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.

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
  • 764
  • 1
  • 18
  • 34

1 Answers1

0

Actually EKEvent has such a property:

@available(OSX 10.11, *)
@NSCopying public var structuredLocation: EKStructuredLocation?
qwerty_so
  • 35,448
  • 8
  • 62
  • 86
  • I'm currently using the EKStructuredLocation property (in my question: *"I suppose the EKReminder has a property (like .structuredLocation stores the address)..."*); **what I am asking for is a property for the contact or phone number associated with the EKReminder**. Try asking Siri to remember you to call someone in your Contacts list in 5 minutes, then go to Reminder.app: you'll see that the reminder title is underlined and, if you tap it, you'll be asked to call that number. I'm looking for the property that allows Apple to do this, storing the phone number for the reminder... – cdf1982 Aug 14 '15 at 19:20
  • So far I have only use calendar events. When I tried accessing a manually created reminder I get `test[93699:8304670] predicate was not created with EKEventStore methods`. Hmpf – qwerty_so Aug 14 '15 at 20:07
  • Yep, EKEvents and EKReminders use different methods. – cdf1982 Aug 14 '15 at 20:11
  • This is really creepy. Looking back where the events/reminders where poked in. This message does make absolutely no sense to me. – qwerty_so Aug 14 '15 at 21:06