iosswiftekeventekeventstoreekreminder

EKReminder with RecurrenceRules


I was work on fetching reminder, I have no problem fetching title, last modified date, notes, etc but I only have problem is recurrenceRules. Here my code:

print(get_reminder_detail.recurrenceRules)

And when I ran the app, it said:

[EKRecurrenceRule <0x28051c1e0> RRULE FREQ=WEEKLY;INTERVAL=1;UNTIL=20200815T061923Z]

As I see two things I am not sure how to pull information from this...first, how can I take FREQ and INTERVAL into the string? Second, how can I pull the UNTIL into the DateComponents?


Solution

  • Do not look at the string that is used to print out the recurrence rule in the console. Look at the properties of the recurrence rule itself.

    https://developer.apple.com/documentation/eventkit/ekrecurrencerule

    Everything you need is right there.