user5723250
user5723250

Reputation:

Calendar app want to sync with the ios calendar in swift

I recently sync my calendar app with ios calendar which i am sending only Title, Location, StartDate, EndDate. Which is not enough for me. How can i sent Repeat, Alert All the details that required in ios calendar. Is this possible to Sent all the event Details to ios calendar.

Image

Here in this image i am sending Title,Location,StartDate, EndDate.. But I need to add Repeat, Alert, Notes all Which i want to sync with Ios Calendar.. Is this possible

Upvotes: 2

Views: 2197

Answers (1)

Andrew2M
Andrew2M

Reputation: 248

The EKCalendarItem you are utilizing to add the initial details has properties and methods that can accomplish your alerts, repetitions and notes:

EKCalendarItem().addAlarm(EKAlarm.init(NSDate()))

EKCalendarItem().notes = "My note text"

EKCalendarItem().addRecurrenceRule(EKRecurrenceRule.init())

Note: the above are sudo code but are pretty straightforward. The EKRecurrenceRule has a more complicated init method with the signature:

init(recurrenceWithFrequency type: EKRecurrenceFrequency,
                interval interval: Int,
                     end end: EKRecurrenceEnd?)

Please consult the Apple docs for more info Calendar Event Apple Docs

Upvotes: 1

Related Questions