ekevent

how can i set array in EKRecurrenceRule for day of the week?

与世无争的帅哥 提交于 2019-12-02 09:48:50
i want to add event on every week in specific day selected by user. it can be one or more or may be all day. i'm storing day value selected by user in model class variable. But when i adding event and select days suppose today is monday and i select Tuesday and Wednesday and save it. then i check in iphone calendar it added in Monday and Wednesday. i cant understand this problem, even i debug my code i get right value for day selection in model class variable then why result different ? Suggest me any solution or idea. Thanks var days = [EKRecurrenceDayOfWeek]() if routineData.routine_monday =

Save event to user's calendar

与世无争的帅哥 提交于 2019-12-01 15:48:11
How do you add an event to the user's calendar, but then allow the user to choose the calendar, etc. I have this code that works, but this adds the event to the user's default calendar. How do I allow the user to change the calendar, customize the alerts etc? I have seen other apps open the calendar app and pre-fill the fields. //add to calendar let eventStore : EKEventStore = EKEventStore() eventStore.requestAccessToEntityType(EKEntityType.Event, completion: { (granted, error) in if granted && error == nil { let event:EKEvent = EKEvent(eventStore: eventStore) event.title = "My event: " + self

Save event to user's calendar

北战南征 提交于 2019-12-01 15:43:09
问题 How do you add an event to the user's calendar, but then allow the user to choose the calendar, etc. I have this code that works, but this adds the event to the user's default calendar. How do I allow the user to change the calendar, customize the alerts etc? I have seen other apps open the calendar app and pre-fill the fields. //add to calendar let eventStore : EKEventStore = EKEventStore() eventStore.requestAccessToEntityType(EKEntityType.Event, completion: { (granted, error) in if granted

How to detect which EKevent was changed

依然范特西╮ 提交于 2019-11-30 23:56:02
I got the problem. I need to know when Events in my EventStore are changed, so for this case I use EKEventStoreChangedNotification but this notification return to me incomprehensible dictionary in userInfo It's look like this: EKEventStoreChangedObjectIDsUserInfoKey = ("x-apple-eventkit:///Event/p429" ); I don't know how I can use this data to taking access for changed object. Please help me This will detect changed events and log the event titles over a date range. Although, I ended up not doing this because in practice I don't know the date range. I need to compare with all the events I'm

Add participant to an event in iOS

旧时模样 提交于 2019-11-30 09:41:09
In the EKParticipant Class reference, " Send attendees to an EKEvent object to get an array of EKParticipant objects. " OK, buy how can I send attendees to an EKEvent object? Someone give example code? The iOS reference says the following: You do not create EKParticipant objects directly. Send attendees to an EKEvent object to get an array of EKParticipant objects. Unfortunately that attendees property is read-only and the ways that these EKParticipant 's come into existence is omitted from the reference. It has lead me to believe that the only way to create new participants, is by using the

EKEvent with eventWithIdentifier on iOS

99封情书 提交于 2019-11-29 20:05:23
问题 If I want to retrieve EKEvent from EKEventStore with eventWithIdentifier method for previously saved event but I always get null. This is the code for adding event: EKEventStore *eventStore = [[EKEventStore alloc] init]; EKEvent *newEvent = [EKEvent eventWithEventStore:eventStore]; newEvent.title = @"Test"; newEvent.availability = EKEventAvailabilityFree; newEvent.startDate = startDate; newEvent.endDate = endDate; [newEvent addAlarm:[EKAlarm alarmWithRelativeOffset:-15*60]]; newEvent.calendar

Add participant to an event in iOS

倾然丶 夕夏残阳落幕 提交于 2019-11-29 14:49:20
问题 In the EKParticipant Class reference, " Send attendees to an EKEvent object to get an array of EKParticipant objects. " OK, buy how can I send attendees to an EKEvent object? Someone give example code? 回答1: The iOS reference says the following: You do not create EKParticipant objects directly. Send attendees to an EKEvent object to get an array of EKParticipant objects. Unfortunately that attendees property is read-only and the ways that these EKParticipant 's come into existence is omitted

How to accept/decline EKEvent invitation?

好久不见. 提交于 2019-11-29 07:08:20
I would like to allow my users to accept/decline a meeting invitation within my app. I think what I need is to update somehow the EKParticipantStatus but it looks like it isn't possible to update. Apple Docs: Event Kit cannot add participants to an event nor change participant information In this stackOverflow question someone suggested to bring the native EventKitUI, which I've tried like this: class CalendarViewController: UIViewController, EKEventViewDelegate { // ..... let eventController = EKEventViewController() guard let eventWithIdentifier = MeetingsFetcher.eventStoreClass.event

How to add an event in the device calendar using swift

守給你的承諾、 提交于 2019-11-28 16:40:28
I would be interested in knowing how to add a calendar event in the device, but using swift. I know there are some examples made in Objective-C, but at the moment nothing in swift. Many thanks. Swift 3.0 version let eventStore : EKEventStore = EKEventStore() // 'EKEntityTypeReminder' or 'EKEntityTypeEvent' eventStore.requestAccess(to: .event) { (granted, error) in if (granted) && (error == nil) { print("granted \(granted)") print("error \(error)") let event:EKEvent = EKEvent(eventStore: eventStore) event.title = "Test Title" event.startDate = Date() event.endDate = Date() event.notes = "This

how to get ekevent EKparticipant email?

ぐ巨炮叔叔 提交于 2019-11-28 10:09:10
how to get ekevent EKparticipant email? EKParticipant class does not have such a attribute. Is it possible to render the native ios participants controller to show the list of participants? I had this same question and when I was at WWDC this year, I asked several Apple engineers and they had no clue. I asked a guy I met in line and he had the answer: event.organizer.URL.resourceSpecifier This works for any EKParticipant. I was cautioned NOT to use the description field because that may change at any time. Hope this helps! None of the above solutions are reliable: URL may be something like