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

147 Posts

Post

Replies

Boosts

Views

Activity

Trying to Update Calendar, Getting Various Errors
I can add a new calendar to the user's calendars like this, using the saveCalendar(_:commit:) method: let ekStore = EKEventStore() func saveCalendar(calendar: EKCalendar) throws {     try ekStore.saveCalendar(calendar, commit: true) } let newList = EKCalendar(for: .reminder, eventStore: store.ekStore) newList.source = store.ekStore.defaultCalendarForNewReminders()?.source newList.title = newListName newList.cgColor = listColor do {     try saveCalendar(calendar: newList) } catch {     print("Error adding list: \(error.localizedDescription)") } And I store the calendar object. When the user finishes editing a calendar (reminders list) in my app, I try to save it like this, using the stored calendar as a starting point: let updatedList = existingCalendar updatedList.title = newListName updatedList.cgColor = listColor do {     try saveCalendar(calendar: updatedList) } catch {     print("Error saving list: \(error.localizedDescription)") } But the calendar doesn't save and I get this error: That account does not support reminders.. I have also tried explicitly setting the calendar's source: updatedList.source = store.ekStore.defaultCalendarForNewReminders()?.source but then I get this error: That calendar may not be moved to another account.. My Question: How do I update calendars (reminder lists) from my app?
0
0
1.4k
Dec ’22
Since iOS 16.1, my widget started to not work properly. Seems like a bug. Can't access Calendar / reminder
My widget app was working fine before iOS 16.1. Since upgrading to 16.1 (and 16.1.1) my widgets starts to be buggy. For some reason, it doesn't fetch a new data from calendar/reminder. Sometimes it fetches new data, sometimes it doesn't. Fetching the data from within the app works perfectly fine though. The problem happens only when fetching calendar/reminder is called from widget. From my research.... I found out that other popular apps have this problem with their widgets as well... Is this issue really a bug on iOS side, and if there is any workaround for now? My app is purely widget app so this bug is kinda big problem for me. Thank you.
1
0
1.1k
Nov ’22
Can a Watch-only App save and remove Events and Reminders?
Swift, EKEventStore supports watchOS, but the save and remove methods do not list watchOS as supported! How can I have a Watch-only App that utilizes events and reminders if they can't be created (and then saved) or deleted (and then removed) from the watch itself, and not having to bring iOS and another device (iPhone) into the mix? I tried it in code anyway, but Xcode tells me that save and remove are not supported on the watch! Thanks in advance for any help or advice.
0
0
751
Oct ’22
Command line app to show reminders
I'm trying to create a very simple command line app that shows all my reminders in the command line but I'm simply not getting any reminders shown (yes I do have some). import Foundation import EventKit let eventStore: EKEventStore = EKEventStore() let defaultList: EKCalendar? var hasAccess: Bool = false var reminders: [EKReminder]? eventStore.requestAccess(to: EKEntityType.reminder, completion: {(granted, error) in       hasAccess = granted ? true : false     }) print("Has access: \(hasAccess)") defaultList = eventStore.defaultCalendarForNewReminders() print("Default List: \(defaultList?.title ?? "NONE")") let lists = eventStore.calendars(for: .reminder) print(lists.map {$0.title}) eventStore.fetchReminders(matching: eventStore.predicateForReminders(in: nil)) { (_ rems: [EKReminder]?) -> Void in   print(rems)   reminders = rems   } print(reminders) As you can see, this is very simply. I get my hasAccess successfully and my defaultList and my lists but not my reminders. I think this is because the fetchReminders function takes a completion and so this is something to do with threads or callbacks or something but the requestAccess function also has a completion but that works. Please help!
1
0
1.1k
Oct ’22
iOS 16 Calendar Issue
I recently noticed that whenever I click on an event that I’ve created with invitees, then the RSVP responses shows that invitees have not yet responded and the invite sends out again to everyone… This is very frustrating and annoys a lot of people… Whenever I’d like to check the Times, Notes, Invitee Responses on an event, then everyone receives an invite again and needs to respond again! Anyone else experiencing this issue?
3
1
957
Oct ’22
EventKit Broken on Ventura
My app is a Catalyst app for the Mac, iPad, and iPhone that reads and writes from reminders lists. For whatever reason it looks like EventKit on the Mac version is just not working at all. No reminders lists are returned when I ask for calendars of type reminder. No calendar is returned for the default calendar for new reminders function either. Everything seems to still work fine on iOS and iPadOS so I'm at a loss for why this would be happening on the Mac. It's always worked fine before. I've tried requesting access again but it just returns that I'm already authorized. I've tried toggling permission off and back on in system settings and that doesn't work either. I'm tempted to try something like logging out of iCloud and back in...but besides my issue locally I've been having users on Ventura beta write in to report the same issue. I definitely can't have all of my users who upgrade to Ventura sign out of iCloud and back in to fix this. They'd say I was crazy even if I tried. I wish I had spotted this earlier in the beta cycle but this is a pretty critical issue for me. Wondering if anyone has seen this or can think of a solution.
1
0
1.2k
Sep ’22
Is there icloud API to get calendar events
Hello, We are developing an app that coordinate meetings that needs to sync icalendar events with our app. We used EventKit and it is working fine on an apple device, but we also need to sync the data from the server (NodeJs) to be able to sync events even when the user doesn't open our app. How can we do so ? I found that we can sync using icloud and using "App-specific password" https://support.apple.com/en-us/HT204397 Some apps made by developers other than Apple ask you to sign in with your Apple ID, so that the app can access information like mail, contacts, and calendars that you store in iCloud. but I can't find an official documentation for the API. Can you please provide me with the API documentation or help me with an alternative. Thanks
1
0
1.7k
Sep ’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?
1
0
1.4k
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.1k
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
929
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
951
Jul ’22
Trying to Update Calendar, Getting Various Errors
I can add a new calendar to the user's calendars like this, using the saveCalendar(_:commit:) method: let ekStore = EKEventStore() func saveCalendar(calendar: EKCalendar) throws {     try ekStore.saveCalendar(calendar, commit: true) } let newList = EKCalendar(for: .reminder, eventStore: store.ekStore) newList.source = store.ekStore.defaultCalendarForNewReminders()?.source newList.title = newListName newList.cgColor = listColor do {     try saveCalendar(calendar: newList) } catch {     print("Error adding list: \(error.localizedDescription)") } And I store the calendar object. When the user finishes editing a calendar (reminders list) in my app, I try to save it like this, using the stored calendar as a starting point: let updatedList = existingCalendar updatedList.title = newListName updatedList.cgColor = listColor do {     try saveCalendar(calendar: updatedList) } catch {     print("Error saving list: \(error.localizedDescription)") } But the calendar doesn't save and I get this error: That account does not support reminders.. I have also tried explicitly setting the calendar's source: updatedList.source = store.ekStore.defaultCalendarForNewReminders()?.source but then I get this error: That calendar may not be moved to another account.. My Question: How do I update calendars (reminder lists) from my app?
Replies
0
Boosts
0
Views
1.4k
Activity
Dec ’22
How to receive data from iCloud calendar?
I'm creating an app that would need to connect to the user's calendar and interpret when they are busy and available based on the information, how would you do this?
Replies
0
Boosts
0
Views
810
Activity
Nov ’22
Since iOS 16.1, my widget started to not work properly. Seems like a bug. Can't access Calendar / reminder
My widget app was working fine before iOS 16.1. Since upgrading to 16.1 (and 16.1.1) my widgets starts to be buggy. For some reason, it doesn't fetch a new data from calendar/reminder. Sometimes it fetches new data, sometimes it doesn't. Fetching the data from within the app works perfectly fine though. The problem happens only when fetching calendar/reminder is called from widget. From my research.... I found out that other popular apps have this problem with their widgets as well... Is this issue really a bug on iOS side, and if there is any workaround for now? My app is purely widget app so this bug is kinda big problem for me. Thank you.
Replies
1
Boosts
0
Views
1.1k
Activity
Nov ’22
EventKit authorization in iOS16.1 app extensions
Something seems to have changed in the iOS16.1 beta regarding EventKit authorization in extensions - is anybody else seeing this? We have widgets that were able to access calendars and events previously, and are no longer able to do so. Checking EKAuthorizationStatus when debugging the Widget extension is now giving us a status of .denied.
Replies
2
Boosts
2
Views
1.4k
Activity
Nov ’22
EventKit EKReminder url, images & tags
The EKReminder class and its parent EKCalendarItem don't seem to offer access to the following members: url, images and tags. Am I missing something? Is there another way to access these members? Is this something I can request?
Replies
0
Boosts
7
Views
841
Activity
Oct ’22
Can a Watch-only App save and remove Events and Reminders?
Swift, EKEventStore supports watchOS, but the save and remove methods do not list watchOS as supported! How can I have a Watch-only App that utilizes events and reminders if they can't be created (and then saved) or deleted (and then removed) from the watch itself, and not having to bring iOS and another device (iPhone) into the mix? I tried it in code anyway, but Xcode tells me that save and remove are not supported on the watch! Thanks in advance for any help or advice.
Replies
0
Boosts
0
Views
751
Activity
Oct ’22
Command line app to show reminders
I'm trying to create a very simple command line app that shows all my reminders in the command line but I'm simply not getting any reminders shown (yes I do have some). import Foundation import EventKit let eventStore: EKEventStore = EKEventStore() let defaultList: EKCalendar? var hasAccess: Bool = false var reminders: [EKReminder]? eventStore.requestAccess(to: EKEntityType.reminder, completion: {(granted, error) in       hasAccess = granted ? true : false     }) print("Has access: \(hasAccess)") defaultList = eventStore.defaultCalendarForNewReminders() print("Default List: \(defaultList?.title ?? "NONE")") let lists = eventStore.calendars(for: .reminder) print(lists.map {$0.title}) eventStore.fetchReminders(matching: eventStore.predicateForReminders(in: nil)) { (_ rems: [EKReminder]?) -> Void in   print(rems)   reminders = rems   } print(reminders) As you can see, this is very simply. I get my hasAccess successfully and my defaultList and my lists but not my reminders. I think this is because the fetchReminders function takes a completion and so this is something to do with threads or callbacks or something but the requestAccess function also has a completion but that works. Please help!
Replies
1
Boosts
0
Views
1.1k
Activity
Oct ’22
how do i make this "copy to my calendar" link work?
i have a calendar opening in a webview in its own view controller. since this screen will encompass the calendar for the year, i need to be able to add the events to the calendars on people's phones. does any one know how i can do this?
Replies
0
Boosts
0
Views
674
Activity
Oct ’22
iOS 16 Calendar Issue
I recently noticed that whenever I click on an event that I’ve created with invitees, then the RSVP responses shows that invitees have not yet responded and the invite sends out again to everyone… This is very frustrating and annoys a lot of people… Whenever I’d like to check the Times, Notes, Invitee Responses on an event, then everyone receives an invite again and needs to respond again! Anyone else experiencing this issue?
Replies
3
Boosts
1
Views
957
Activity
Oct ’22
TN3130: Changes to EventKit in macOS Ventura 13
Test your apps against EventKit API changes in macOS Ventura 13. View Technote TN3130 >
Replies
0
Boosts
0
Views
1.2k
Activity
Oct ’22
TN3132: Changes to EventKit and EventKitUI in iOS 16
Test your apps against EventKit and EventKitUI API changes in iOS 16. View Technote TN3132 >
Replies
0
Boosts
0
Views
745
Activity
Oct ’22
EventKit Broken on Ventura
My app is a Catalyst app for the Mac, iPad, and iPhone that reads and writes from reminders lists. For whatever reason it looks like EventKit on the Mac version is just not working at all. No reminders lists are returned when I ask for calendars of type reminder. No calendar is returned for the default calendar for new reminders function either. Everything seems to still work fine on iOS and iPadOS so I'm at a loss for why this would be happening on the Mac. It's always worked fine before. I've tried requesting access again but it just returns that I'm already authorized. I've tried toggling permission off and back on in system settings and that doesn't work either. I'm tempted to try something like logging out of iCloud and back in...but besides my issue locally I've been having users on Ventura beta write in to report the same issue. I definitely can't have all of my users who upgrade to Ventura sign out of iCloud and back in to fix this. They'd say I was crazy even if I tried. I wish I had spotted this earlier in the beta cycle but this is a pretty critical issue for me. Wondering if anyone has seen this or can think of a solution.
Replies
1
Boosts
0
Views
1.2k
Activity
Sep ’22
Re-ask to permission on update App specific version
How could I set App to re-ask permission after update (for specific version)
Replies
0
Boosts
0
Views
700
Activity
Sep ’22
Is there icloud API to get calendar events
Hello, We are developing an app that coordinate meetings that needs to sync icalendar events with our app. We used EventKit and it is working fine on an apple device, but we also need to sync the data from the server (NodeJs) to be able to sync events even when the user doesn't open our app. How can we do so ? I found that we can sync using icloud and using "App-specific password" https://support.apple.com/en-us/HT204397 Some apps made by developers other than Apple ask you to sign in with your Apple ID, so that the app can access information like mail, contacts, and calendars that you store in iCloud. but I can't find an official documentation for the API. Can you please provide me with the API documentation or help me with an alternative. Thanks
Replies
1
Boosts
0
Views
1.7k
Activity
Sep ’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.4k
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.1k
Activity
Aug ’22
update / delete calendar color and name
Can anybody help me how to change in swift the color and name label for a calendar. Also the command how to delete a calendar in swift.
Replies
0
Boosts
0
Views
547
Activity
Jul ’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
929
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
951
Activity
Jul ’22
I can't enroll in an organized subscription.
I have applied for apple id and want to register in Organization form but I can't. On the website it says "Your enrollment in the Apple Developer Program could not be completed at this time." How do I fix this?
Replies
0
Boosts
0
Views
1.1k
Activity
Jul ’22