EventKit

RSS for tag

Create, view, and edit calendar and reminder events using EventKit and EventKitUI. Request read-only, write-only, or full-access to Calendar data.

Posts under EventKit tag

142 Posts

Post

Replies

Boosts

Views

Activity

EventKit in SwiftUI
I am new to Swift and I would like to make an app including complex calendar events. I have done some research this morning and I'm having trouble finding any documentation or tutorials on implementing EventKit in SwiftUI, everyone is using storyboard but I don't know how to use that. Is EventKit supported in swiftUI or do I have to start learning story board?
1
0
1.6k
Sep ’22
Why doesn’t iphone 13 associate downloaded .ics (iCal) files with the iOS calendar?
On iPhone 13, when I am on a website that offers a link to an .ics file containing one or more event and I choose to download the file, the iPhone does not give me the Calendar App as a suggestion to open the file. It seems to me, that there should most definitely be an association. Why is there not? Also, I am aware of the steps to otherwise subscribe to a URL, but I feel like that is too much work. the iPhone Calendar app should be able to handle importing an event from an ics file JUST as you can do on a MacBook. What am I missing? Is there an issue with my phone, or did Apple decide to not make the association for some reason?
0
1
1.3k
Aug ’22
Modify behavior of 'Delete Event' action inside the 'Event Details' view
Hi, I am developing an app which has a calendar integrated. This calendar comes from a package called CalendarKit (https://github.com/richardtop/CalendarKit ). With this calendar you can access to all the events of you mobile integrated calendar and create new ones, modify them, delete, etc. All the events on you mobile calendar are going to be represented here and the same in the other way, everything that you create here will be represented on you mobile calendar. So the main question is. How can i access to the 'Delete Event' action inside the 'Event Details' view? I know that i can delete an event programmatically, but i need to "modify" the behavior when clicking on the item 'Delete Event'. Is there any possible way to access to this item inside event details and when clicking on it do a custom action?. For example, when clicking i want to: print a text in the console, show an alert, get the EventID of the event deleted, etc. Can somebody help me with this?? Thanks a lot in advance.
1
0
1.2k
Jul ’22
Apple Watch Error I am not sure how to solve
Hi I have built an application and trying to publish it to App Store Connect to do a TestFlight. My application is called Meeting Reminder App with an SKU of DanD.meeting-reminder. For some reason, every time I try to distribute the app to the App Store Connect, an email gets sent to me with this error: We identified one or more issues with a recent delivery for your app, "Meeting Reminder App" 1.0 (21). Please correct the following issues, then upload again. ITMS-90683: Missing Purpose String in Info.plist - Your app‘s code references one or more APIs that access sensitive user data. The app‘s Info.plist file should contain a NSCalendarsUsageDescription key with a user-facing purpose string explaining clearly and completely why your app needs the data. If you're using external libraries or SDKs, they may reference APIs that require a purpose string. While your app might not use these APIs, a purpose string is still required. For details, visit: https://developer.apple.com/documentation/uikit/protecting_the_user_s_privacy/requesting_access_to_protected_resources I have the key under the name of Privacy - Calendars Usage Description within the info.plist, and I have also made sure that the entitlement: Calendars is in both the Entitlement file for both release and debug. But somehow it still gives me the error. I would also like to point out that the Usage Description and the entitlements are only in the Extension file and not the actual App file. I do not know if that is necessary but please tell me if it is.
1
0
1.2k
Jul ’22
EventKit does not provide day of recurrence in recurrence rule for one day recurring event
I am using EventKit to fetch all events from the default Apple Calendar in my app. When there is a custom recurring event in the Apple Calendar with multiple days of recurrence then EventKit returns an array of daysOfTheWeek in the recurrence rule What I mean is Event_A is recurring weekly every Friday and Saturday then EventKit returns an array of objects like this   calendar = "testingcurvecalendar@gmail.com";   endDate = "2022-07-30 11:00:00";   id = "5FFF5521-18BB-497C-8EF5-4E72647A6A24:2AE552B8-85C4-489C-8A36-DACF95D83E61";   lastModifiedDate = "2022-05-20 10:25:01";   rrule =   {     calendar = gregorian;     daysOfTheWeek =     (             {         dayOfTheWeek = Friday;         weekNumber = 0;       },             {         dayOfTheWeek = Saturday;         weekNumber = 0;       }     );     freq = weekly;     interval = 1;     until =     {       count = 0;       date = "2022-07-31 23:59:59";     };   };   startDate = "2022-07-30 10:00:00";   title = MultipledayswithEnd; }, But if an event is recurring for only single day then eventkit does not return daysOfTheWeek object i.e. Event_B is recurring weekly every Monday then the object received from the eventkit is as follows   calendar = "testingcurvecalendar@gmail.com";   endDate = "2022-07-27 11:00:00";   id = "5FFF5521-18BB-497C-8EF5-4E72647A6A24:C57AFD95-75A0-4F75-B4F0-00D7321BFB21";   lastModifiedDate = "2022-05-20 10:27:23";   rrule =   {     calendar = gregorian;     freq = weekly;     interval = 1;     until =     {       count = 0;       date = "2022-07-31 23:59:59";     };   };   startDate = "2022-07-27 10:00:00";   title = Singlewithend; }, The issue is I would like to display the day of recurrence in my app which I am able to in case of Multi-day recurring events because I receive the days in dayOfTheWeek object but I cannot do it in Single-day recurring events. The code for fetching events from the Calendar is as follows   NSPredicate *fetchCalendarEvents = [eventStore predicateForEventsWithStartDate:[NSDate date] endDate:endDate   calendars:calendarArray];   NSArray *matchingEvents = [eventStore eventsMatchingPredicate:fetchCalendarEvents];   NSMutableArray * eventsDataArray = [self eventsToDataArray:matchingEvents]; Can someone please help me with this issue?
0
0
881
May ’22
EKEventEditViewController Add and Cancel buttons not responding
I am trying to add a calendar event using `EKEventEditViewController`. I have setup a `EKEventEditViewController` properly with an `EKEventStore`, `EKEvent`, and its `editViewDelegate` as the presenting view controller. The `EKEventEditViewController` presents itself correctly, but when I press either 'add' or 'cancel', `didCompleteWithAction` does not called in `EKEventEditViewDelegate`. But, I do get this error (no crash though): [EKCalendarItemLocationInlineEditItem isSubitemAtIndexSaveable:] - Location Inline Edit Item didn't have a text label on its non conference location cell; will return NOYou can see here that `EKCalendarItemLocationInlineEditItem` is in the `EventKitUI` framework.It seems like this has something to do with location but I can't seem to figure it out. Has anyone ever encountered this error, or have any tips on how to further debug? Thanks! I am running iOS 11 and Xcode 9.0.1.
4
0
3.3k
May ’22
Transfer EventKit Data from iOS to watchOS
Hi there, I am trying to transfer EventKit Data like EKCalendars / EKEvents / EKReminder from iOS to watchOS via WatchConnectivity. The connection works but I cannot push these objects directly in response. I also cannot use NSKeyedArchiver since EKCalendars (example) are not able to get converted to Data. So, any Idea how I can transfer simple EventKit Data from iOS to watchOS? An addtional hint: I am already fetching these data within watchOS (so no solution) but if the device has an MDM profile it cannot fetch anything but the holiday calendar so I just wanted to test if the iPhone can fetch more (since the MDM profile is stored on iPhone, not on watch) but I can't transfer these data trough WatchConnectivity. Any hints would be nice – cannot be as hard as I think. Thanks!
0
0
949
Apr ’22
Issue with EKSource not localizating Default, Other and Subscribed Calendars
I have an issue with receiving localized version of the strings "Default", "Other" and "Subscribed Calendars" from EKSource. The strings aren't coming back as localized. I'm curious to know if we should be localizing strings that come from Apple ourselves, or if this is a bug? What's interesting is that the strings are localized in the calendar app and the subtitles like "US holiday" and "Birthday" are coming back localized, just not "Default", "Other" and "Subscribed Calendars". Similar question posted on stack overflow: https://stackoverflow.com/questions/42294340/is-it-possible-to-localize-the-title-of-eksource
0
0
761
Apr ’22
Comparing Dates
I need to compare an attribute of Date data type with current date and check if it has a difference of 7 days or more. I tried this but its not working: if (Calendar.current.dateComponents([.day], from: resident.infectionDate ?? Date.distantPast, to: Date.now) < 7) Error: Referencing operator function '<' on 'BinaryInteger' requires that 'DateComponents' conform to 'BinaryInteger'
1
0
1.2k
Mar ’22
EKEventStoreChanged
I'm trying to enable my app to receive a notification each time the event store changes.The documentation for EKEventStore at https://developer.apple.com/reference/eventkit/ekeventstore shows the following:static let EKEventStoreChanged: NSNotification.NameWhat does that mean? How do I use that information?
2
0
1.5k
Feb ’22
Create subscription calendar cal.ical from my app with url
Hello, In the calendar app people can subscribe to calendars from the web and have the events in the calendar, but can my Xcode app generate a local url with an ical file that can be subscribed to? Just for the user on the device with the app, not on the internet? For example my app when run creates an ical file of events that repeat each year, like international days of the year and puts it somewhere like in the group folder or somewhere behind the scenes and then the user can click that link from within the app or copy and past it into the calendar app by adding a new calendar and putting in the url? I don't want to put the url online because the information is private and just for the user of the device.
1
0
1.8k
Feb ’22
Create a calendar event with an attached file?
Hi, I've been trying to create an event with an attached file (a pdf in my case). At the moment I would have the following: set NewEvent to make new event with properties {summary:"OR", start date:Dia, end date:Dia_fin, } I need the property which would be followed by the file route, I have tried with url but it obviously doesn't work. Thank you very much.
1
0
1.1k
Jan ’22
Full calendar widget with events side by side removed
I relied heavily on the previous calendar widget in the form of a rectangle that showed both the upcoming events on the left hand side and the full calendar on the right. This was convenient to both glance at your iPhone to see your upcoming events or knowing what weekday a specific date is. Now the rectangular calendar widget shows only upcoming events, you would need two widgets to achieve what one widget did. I believe this is a step back rather than an improvement. I'd much appreciate it if the old widget would make its way back to iOS 15. Thank you.
1
0
1.5k
Jan ’22
EventKit in SwiftUI
I am new to Swift and I would like to make an app including complex calendar events. I have done some research this morning and I'm having trouble finding any documentation or tutorials on implementing EventKit in SwiftUI, everyone is using storyboard but I don't know how to use that. Is EventKit supported in swiftUI or do I have to start learning story board?
Replies
1
Boosts
0
Views
1.6k
Activity
Sep ’22
Why doesn’t iphone 13 associate downloaded .ics (iCal) files with the iOS calendar?
On iPhone 13, when I am on a website that offers a link to an .ics file containing one or more event and I choose to download the file, the iPhone does not give me the Calendar App as a suggestion to open the file. It seems to me, that there should most definitely be an association. Why is there not? Also, I am aware of the steps to otherwise subscribe to a URL, but I feel like that is too much work. the iPhone Calendar app should be able to handle importing an event from an ics file JUST as you can do on a MacBook. What am I missing? Is there an issue with my phone, or did Apple decide to not make the association for some reason?
Replies
0
Boosts
1
Views
1.3k
Activity
Aug ’22
Modify behavior of 'Delete Event' action inside the 'Event Details' view
Hi, I am developing an app which has a calendar integrated. This calendar comes from a package called CalendarKit (https://github.com/richardtop/CalendarKit ). With this calendar you can access to all the events of you mobile integrated calendar and create new ones, modify them, delete, etc. All the events on you mobile calendar are going to be represented here and the same in the other way, everything that you create here will be represented on you mobile calendar. So the main question is. How can i access to the 'Delete Event' action inside the 'Event Details' view? I know that i can delete an event programmatically, but i need to "modify" the behavior when clicking on the item 'Delete Event'. Is there any possible way to access to this item inside event details and when clicking on it do a custom action?. For example, when clicking i want to: print a text in the console, show an alert, get the EventID of the event deleted, etc. Can somebody help me with this?? Thanks a lot in advance.
Replies
1
Boosts
0
Views
1.2k
Activity
Jul ’22
Apple Watch Error I am not sure how to solve
Hi I have built an application and trying to publish it to App Store Connect to do a TestFlight. My application is called Meeting Reminder App with an SKU of DanD.meeting-reminder. For some reason, every time I try to distribute the app to the App Store Connect, an email gets sent to me with this error: We identified one or more issues with a recent delivery for your app, "Meeting Reminder App" 1.0 (21). Please correct the following issues, then upload again. ITMS-90683: Missing Purpose String in Info.plist - Your app‘s code references one or more APIs that access sensitive user data. The app‘s Info.plist file should contain a NSCalendarsUsageDescription key with a user-facing purpose string explaining clearly and completely why your app needs the data. If you're using external libraries or SDKs, they may reference APIs that require a purpose string. While your app might not use these APIs, a purpose string is still required. For details, visit: https://developer.apple.com/documentation/uikit/protecting_the_user_s_privacy/requesting_access_to_protected_resources I have the key under the name of Privacy - Calendars Usage Description within the info.plist, and I have also made sure that the entitlement: Calendars is in both the Entitlement file for both release and debug. But somehow it still gives me the error. I would also like to point out that the Usage Description and the entitlements are only in the Extension file and not the actual App file. I do not know if that is necessary but please tell me if it is.
Replies
1
Boosts
0
Views
1.2k
Activity
Jul ’22
EventKit does not provide day of recurrence in recurrence rule for one day recurring event
I am using EventKit to fetch all events from the default Apple Calendar in my app. When there is a custom recurring event in the Apple Calendar with multiple days of recurrence then EventKit returns an array of daysOfTheWeek in the recurrence rule What I mean is Event_A is recurring weekly every Friday and Saturday then EventKit returns an array of objects like this   calendar = "testingcurvecalendar@gmail.com";   endDate = "2022-07-30 11:00:00";   id = "5FFF5521-18BB-497C-8EF5-4E72647A6A24:2AE552B8-85C4-489C-8A36-DACF95D83E61";   lastModifiedDate = "2022-05-20 10:25:01";   rrule =   {     calendar = gregorian;     daysOfTheWeek =     (             {         dayOfTheWeek = Friday;         weekNumber = 0;       },             {         dayOfTheWeek = Saturday;         weekNumber = 0;       }     );     freq = weekly;     interval = 1;     until =     {       count = 0;       date = "2022-07-31 23:59:59";     };   };   startDate = "2022-07-30 10:00:00";   title = MultipledayswithEnd; }, But if an event is recurring for only single day then eventkit does not return daysOfTheWeek object i.e. Event_B is recurring weekly every Monday then the object received from the eventkit is as follows   calendar = "testingcurvecalendar@gmail.com";   endDate = "2022-07-27 11:00:00";   id = "5FFF5521-18BB-497C-8EF5-4E72647A6A24:C57AFD95-75A0-4F75-B4F0-00D7321BFB21";   lastModifiedDate = "2022-05-20 10:27:23";   rrule =   {     calendar = gregorian;     freq = weekly;     interval = 1;     until =     {       count = 0;       date = "2022-07-31 23:59:59";     };   };   startDate = "2022-07-27 10:00:00";   title = Singlewithend; }, The issue is I would like to display the day of recurrence in my app which I am able to in case of Multi-day recurring events because I receive the days in dayOfTheWeek object but I cannot do it in Single-day recurring events. The code for fetching events from the Calendar is as follows   NSPredicate *fetchCalendarEvents = [eventStore predicateForEventsWithStartDate:[NSDate date] endDate:endDate   calendars:calendarArray];   NSArray *matchingEvents = [eventStore eventsMatchingPredicate:fetchCalendarEvents];   NSMutableArray * eventsDataArray = [self eventsToDataArray:matchingEvents]; Can someone please help me with this issue?
Replies
0
Boosts
0
Views
881
Activity
May ’22
EKEventEditViewController Add and Cancel buttons not responding
I am trying to add a calendar event using `EKEventEditViewController`. I have setup a `EKEventEditViewController` properly with an `EKEventStore`, `EKEvent`, and its `editViewDelegate` as the presenting view controller. The `EKEventEditViewController` presents itself correctly, but when I press either 'add' or 'cancel', `didCompleteWithAction` does not called in `EKEventEditViewDelegate`. But, I do get this error (no crash though): [EKCalendarItemLocationInlineEditItem isSubitemAtIndexSaveable:] - Location Inline Edit Item didn't have a text label on its non conference location cell; will return NOYou can see here that `EKCalendarItemLocationInlineEditItem` is in the `EventKitUI` framework.It seems like this has something to do with location but I can't seem to figure it out. Has anyone ever encountered this error, or have any tips on how to further debug? Thanks! I am running iOS 11 and Xcode 9.0.1.
Replies
4
Boosts
0
Views
3.3k
Activity
May ’22
Transfer EventKit Data from iOS to watchOS
Hi there, I am trying to transfer EventKit Data like EKCalendars / EKEvents / EKReminder from iOS to watchOS via WatchConnectivity. The connection works but I cannot push these objects directly in response. I also cannot use NSKeyedArchiver since EKCalendars (example) are not able to get converted to Data. So, any Idea how I can transfer simple EventKit Data from iOS to watchOS? An addtional hint: I am already fetching these data within watchOS (so no solution) but if the device has an MDM profile it cannot fetch anything but the holiday calendar so I just wanted to test if the iPhone can fetch more (since the MDM profile is stored on iPhone, not on watch) but I can't transfer these data trough WatchConnectivity. Any hints would be nice – cannot be as hard as I think. Thanks!
Replies
0
Boosts
0
Views
949
Activity
Apr ’22
Issue with EKSource not localizating Default, Other and Subscribed Calendars
I have an issue with receiving localized version of the strings "Default", "Other" and "Subscribed Calendars" from EKSource. The strings aren't coming back as localized. I'm curious to know if we should be localizing strings that come from Apple ourselves, or if this is a bug? What's interesting is that the strings are localized in the calendar app and the subtitles like "US holiday" and "Birthday" are coming back localized, just not "Default", "Other" and "Subscribed Calendars". Similar question posted on stack overflow: https://stackoverflow.com/questions/42294340/is-it-possible-to-localize-the-title-of-eksource
Replies
0
Boosts
0
Views
761
Activity
Apr ’22
Comparing Dates
I need to compare an attribute of Date data type with current date and check if it has a difference of 7 days or more. I tried this but its not working: if (Calendar.current.dateComponents([.day], from: resident.infectionDate ?? Date.distantPast, to: Date.now) < 7) Error: Referencing operator function '<' on 'BinaryInteger' requires that 'DateComponents' conform to 'BinaryInteger'
Replies
1
Boosts
0
Views
1.2k
Activity
Mar ’22
EKEventStoreChanged
I'm trying to enable my app to receive a notification each time the event store changes.The documentation for EKEventStore at https://developer.apple.com/reference/eventkit/ekeventstore shows the following:static let EKEventStoreChanged: NSNotification.NameWhat does that mean? How do I use that information?
Replies
2
Boosts
0
Views
1.5k
Activity
Feb ’22
Create subscription calendar cal.ical from my app with url
Hello, In the calendar app people can subscribe to calendars from the web and have the events in the calendar, but can my Xcode app generate a local url with an ical file that can be subscribed to? Just for the user on the device with the app, not on the internet? For example my app when run creates an ical file of events that repeat each year, like international days of the year and puts it somewhere like in the group folder or somewhere behind the scenes and then the user can click that link from within the app or copy and past it into the calendar app by adding a new calendar and putting in the url? I don't want to put the url online because the information is private and just for the user of the device.
Replies
1
Boosts
0
Views
1.8k
Activity
Feb ’22
Create a calendar event with an attached file?
Hi, I've been trying to create an event with an attached file (a pdf in my case). At the moment I would have the following: set NewEvent to make new event with properties {summary:"OR", start date:Dia, end date:Dia_fin, } I need the property which would be followed by the file route, I have tried with url but it obviously doesn't work. Thank you very much.
Replies
1
Boosts
0
Views
1.1k
Activity
Jan ’22
Full calendar widget with events side by side removed
I relied heavily on the previous calendar widget in the form of a rectangle that showed both the upcoming events on the left hand side and the full calendar on the right. This was convenient to both glance at your iPhone to see your upcoming events or knowing what weekday a specific date is. Now the rectangular calendar widget shows only upcoming events, you would need two widgets to achieve what one widget did. I believe this is a step back rather than an improvement. I'd much appreciate it if the old widget would make its way back to iOS 15. Thank you.
Replies
1
Boosts
0
Views
1.5k
Activity
Jan ’22