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

146 Posts

Post

Replies

Boosts

Views

Activity

(EventKit) Problems with Adding Reminder Calendar Error, SwiftU
Hi! I getting a lot of errors in Adding Reminder and I don't know why at all. What happened to the database connection? Where did I go wrong. Any feedback would be appreciated. Thanks debug: error adding Error Domain=EKErrorDomain Code=2 "No start date has been set." UserInfo={NSLocalizedDescription=No start date has been set.} 2023-01-20 15:41:00.212842+0700 snp65-project[50253:1714614] [xpc] XPC connection was invalidated Here is the code:
0
0
883
Jan ’23
Registration
I have a person I do not know who has attached to my account as a family member. I have changed serves because of this. I have bought three new phones. She has used my Apple Card I have never used and created multiple family members as well on our Verizon account I left and now my att&t account. I don’t even have my children on this new phone that I just bought, and already this new phone is hacked, and she has added two phone numbers on the Verizon account, one of which I traded in for this new phone because Verizon said this person had attached to my line. This person has all kind of apple products on our account. My husband and I are in the process of doing everything we can to remove this person. I have called apple multiple times. Joining as a developer, which I was given this exciting opportunity this past June, and the same person somehow took over my files then, I wanted to make sure I can secure my account moving forward. I do not want to join register with this Id that has this person attached that I do not even know. She has been stealing money from multiple accounts and using my husband’s emails, and it’s been a nightmare to say the least. I have been harassed for months and created multiple Apple IDs all of which had 2 factor authentication, but they were all stolen. This person has multiple devices already hooked up to everything, and I am sorry for the long email, but I cannot send any emails out at this point, and my apps, text, and phone calls have basically been controlled for months. I have reported this, and I wanted to let you know what was going on because even when I try to change my Apple ID password it will not allow me to do so at times. Please help me remove this. Person named Ashley (she goes by Danny using my husband’s account Olivia dawn will and one more). And please help me remove thes numbers that I do not have anymore. I have one. I just want her blocked from my things thank u! 478-747-2787 Mary Caroline Coleman
0
0
1.3k
Dec ’22
EKReminder URL property is nil
Quick question... how do I set the URL of a reminder? In the Reminders app, user can add a URL when they create a reminder.There's also a "url" property in EKCalendarItem (parent class of EKReminder).However, "url" is always nil both when I set it or when I read it from an existing reminder which contains a URL.Is this a bug?ThanksBill
4
2
2.2k
Dec ’22
Add multiple events to the Calendar with Concurrency
I created a function to add my course events to the calendar app using EventKit. After learning the swift concurrency, I want to update my code to make the progress much faster, namely using the detached task or TaskGroup to add these events. Synchronize code without detached task or task group: func export_test() { Task.detached { for i in 0...15 { print("Task \(i): Start") let courseEvent = EKEvent(eventStore: eventStore) courseEvent.title = "TEST" courseEvent.location = "TEST LOC" courseEvent.startDate = .now courseEvent.endDate = .now.addingTimeInterval(3600) courseEvent.calendar = eventStore.defaultCalendarForNewEvents courseEvent.addRecurrenceRule(EKRecurrenceRule(recurrenceWith: .daily, interval: 1, end: nil)) do { try eventStore.save(courseEvent, span: .futureEvents) } catch { print(error.localizedDescription) } print("Task \(i): Finished") } } } Doing the same thing using the TaskGroup : func export_test() { Task.detached { await withTaskGroup(of: Void.self) { group in for i in 0...15 { group.addTask { print("Task \(i): Start") let courseEvent = EKEvent(eventStore: eventStore) courseEvent.title = "TEST" courseEvent.location = "TEST LOC" courseEvent.startDate = .now courseEvent.endDate = .now.addingTimeInterval(3600) courseEvent.calendar = eventStore.defaultCalendarForNewEvents courseEvent.addRecurrenceRule(EKRecurrenceRule(recurrenceWith: .daily, interval: 1, end: nil)) do { try eventStore.save(courseEvent, span: .futureEvents) } catch { print(error.localizedDescription) } print("Task \(i): Finished") } } } } } The output of the TaskGroup version: Task 0: Start Task 1: Start Task 2: Start Task 4: Start Task 3: Start Task 5: Start Task 6: Start Task 7: Start Task 0: Finished Task 8: Start Task 1: Finished Task 9: Start Sometimes, only a few tasks will been done, and others will not, or even never been started (I created 16 tasks but only printed 9 in this example). Sometimes, all of these events can be added. In my point of view, I have created 16 child tasks in the TaskGroup. Each child task will add one event to the Calendar. I think in this way, I can take the full advantage of the multi-core performance (maybe it's actually not. 🙃) If I put the for-loop inside the group.addTask closure, it will always have the expected result, but in this way, we only have a single loop so the TaskGroup may no longer needed. I'm really exhausted🙃🙃.
1
0
1.9k
Dec ’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?
0
0
1.5k
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.3k
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
857
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.4k
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
1.1k
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.3k
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.8k
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.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.2k
Aug ’22
(EventKit) Problems with Adding Reminder Calendar Error, SwiftU
Hi! I getting a lot of errors in Adding Reminder and I don't know why at all. What happened to the database connection? Where did I go wrong. Any feedback would be appreciated. Thanks debug: error adding Error Domain=EKErrorDomain Code=2 "No start date has been set." UserInfo={NSLocalizedDescription=No start date has been set.} 2023-01-20 15:41:00.212842+0700 snp65-project[50253:1714614] [xpc] XPC connection was invalidated Here is the code:
Replies
0
Boosts
0
Views
883
Activity
Jan ’23
Registration
I have a person I do not know who has attached to my account as a family member. I have changed serves because of this. I have bought three new phones. She has used my Apple Card I have never used and created multiple family members as well on our Verizon account I left and now my att&t account. I don’t even have my children on this new phone that I just bought, and already this new phone is hacked, and she has added two phone numbers on the Verizon account, one of which I traded in for this new phone because Verizon said this person had attached to my line. This person has all kind of apple products on our account. My husband and I are in the process of doing everything we can to remove this person. I have called apple multiple times. Joining as a developer, which I was given this exciting opportunity this past June, and the same person somehow took over my files then, I wanted to make sure I can secure my account moving forward. I do not want to join register with this Id that has this person attached that I do not even know. She has been stealing money from multiple accounts and using my husband’s emails, and it’s been a nightmare to say the least. I have been harassed for months and created multiple Apple IDs all of which had 2 factor authentication, but they were all stolen. This person has multiple devices already hooked up to everything, and I am sorry for the long email, but I cannot send any emails out at this point, and my apps, text, and phone calls have basically been controlled for months. I have reported this, and I wanted to let you know what was going on because even when I try to change my Apple ID password it will not allow me to do so at times. Please help me remove this. Person named Ashley (she goes by Danny using my husband’s account Olivia dawn will and one more). And please help me remove thes numbers that I do not have anymore. I have one. I just want her blocked from my things thank u! 478-747-2787 Mary Caroline Coleman
Replies
0
Boosts
0
Views
1.3k
Activity
Dec ’22
EKReminder URL property is nil
Quick question... how do I set the URL of a reminder? In the Reminders app, user can add a URL when they create a reminder.There's also a "url" property in EKCalendarItem (parent class of EKReminder).However, "url" is always nil both when I set it or when I read it from an existing reminder which contains a URL.Is this a bug?ThanksBill
Replies
4
Boosts
2
Views
2.2k
Activity
Dec ’22
Add multiple events to the Calendar with Concurrency
I created a function to add my course events to the calendar app using EventKit. After learning the swift concurrency, I want to update my code to make the progress much faster, namely using the detached task or TaskGroup to add these events. Synchronize code without detached task or task group: func export_test() { Task.detached { for i in 0...15 { print("Task \(i): Start") let courseEvent = EKEvent(eventStore: eventStore) courseEvent.title = "TEST" courseEvent.location = "TEST LOC" courseEvent.startDate = .now courseEvent.endDate = .now.addingTimeInterval(3600) courseEvent.calendar = eventStore.defaultCalendarForNewEvents courseEvent.addRecurrenceRule(EKRecurrenceRule(recurrenceWith: .daily, interval: 1, end: nil)) do { try eventStore.save(courseEvent, span: .futureEvents) } catch { print(error.localizedDescription) } print("Task \(i): Finished") } } } Doing the same thing using the TaskGroup : func export_test() { Task.detached { await withTaskGroup(of: Void.self) { group in for i in 0...15 { group.addTask { print("Task \(i): Start") let courseEvent = EKEvent(eventStore: eventStore) courseEvent.title = "TEST" courseEvent.location = "TEST LOC" courseEvent.startDate = .now courseEvent.endDate = .now.addingTimeInterval(3600) courseEvent.calendar = eventStore.defaultCalendarForNewEvents courseEvent.addRecurrenceRule(EKRecurrenceRule(recurrenceWith: .daily, interval: 1, end: nil)) do { try eventStore.save(courseEvent, span: .futureEvents) } catch { print(error.localizedDescription) } print("Task \(i): Finished") } } } } } The output of the TaskGroup version: Task 0: Start Task 1: Start Task 2: Start Task 4: Start Task 3: Start Task 5: Start Task 6: Start Task 7: Start Task 0: Finished Task 8: Start Task 1: Finished Task 9: Start Sometimes, only a few tasks will been done, and others will not, or even never been started (I created 16 tasks but only printed 9 in this example). Sometimes, all of these events can be added. In my point of view, I have created 16 child tasks in the TaskGroup. Each child task will add one event to the Calendar. I think in this way, I can take the full advantage of the multi-core performance (maybe it's actually not. 🙃) If I put the for-loop inside the group.addTask closure, it will always have the expected result, but in this way, we only have a single loop so the TaskGroup may no longer needed. I'm really exhausted🙃🙃.
Replies
1
Boosts
0
Views
1.9k
Activity
Dec ’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.5k
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
913
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.3k
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.6k
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
952
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
857
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.4k
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
735
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
1.1k
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.3k
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
848
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.3k
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
801
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.8k
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.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.2k
Activity
Aug ’22