Search code examples
iosreminders

Programmatically Create Reminder For NSUserActivity


With iOS 9, NSUserActivities can be used with Siri, for example, "Siri, remind me of this in an hour", creates the reminder with her knowing the context of what "THIS" is. Is there a way to programmatically do that, so at the click of a button you could create a reminder?


Solution

  • Not an answer as such, but a path to one: since reminders a la the Reminders app are managed by EventKit (see https://developer.apple.com/library/ios/documentation/DataManagement/Conceptual/EventKitProgGuide/Introduction/Introduction.html), try making a Smart Reminder using Siri, then examine the resulting reminder using the API. At a guess, it's using the -URL property on the reminder.