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

Flutter(IOS) app concern in the External Link Account API
0 I've submitted my app for review on App Store. It got rejected and they replied me with this explanation. Your "reader" app uses the External Link Account entitlement to link out for account creation and management but does not meet all requirements for using this entitlement. Specifically, we found that your app does not meet the following requirement(s): Your app does not use the External Link Account API to populate the modal sheet before every instance of linking out for account creation and management. These requirements help protect user privacy and security, prevent scams and fraudulent activity, and maintain the overall quality of the experience when leaving the app to create or manage accounts. Next Steps It would be appropriate to revise your app to address the issues identified above. Make sure it meets all other requirements for apps using the External Link Account entitlement before resubmitting for review. Resources Learn more about the StoreKit External Link Account entitlement on Apple Developer. Learn more about requirements for "reader" apps in App Store Review Guideline 3.1.3(a). Requesting help in understanding and resolving this. I tried every solution and configuration which they have recommended, I resubmitted the app and again got rejected. On their official website there are two methods: canOpen(popup model for confirmation that you're about leave the app) and open(to open the link in the browser). What they are saying that if your app is redirecting to some link, it should open a confirmation popup model and then on confirmation, it should move forward. But I didn't understand where these methods are defined or where can I get any sample or demo app.
1
0
1.4k
Jan ’23
(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
946
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.4k
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.3k
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
2k
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.6k
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.4k
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
910
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.5k
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.2k
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.4k
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.9k
Sep ’22
Flutter(IOS) app concern in the External Link Account API
0 I've submitted my app for review on App Store. It got rejected and they replied me with this explanation. Your "reader" app uses the External Link Account entitlement to link out for account creation and management but does not meet all requirements for using this entitlement. Specifically, we found that your app does not meet the following requirement(s): Your app does not use the External Link Account API to populate the modal sheet before every instance of linking out for account creation and management. These requirements help protect user privacy and security, prevent scams and fraudulent activity, and maintain the overall quality of the experience when leaving the app to create or manage accounts. Next Steps It would be appropriate to revise your app to address the issues identified above. Make sure it meets all other requirements for apps using the External Link Account entitlement before resubmitting for review. Resources Learn more about the StoreKit External Link Account entitlement on Apple Developer. Learn more about requirements for "reader" apps in App Store Review Guideline 3.1.3(a). Requesting help in understanding and resolving this. I tried every solution and configuration which they have recommended, I resubmitted the app and again got rejected. On their official website there are two methods: canOpen(popup model for confirmation that you're about leave the app) and open(to open the link in the browser). What they are saying that if your app is redirecting to some link, it should open a confirmation popup model and then on confirmation, it should move forward. But I didn't understand where these methods are defined or where can I get any sample or demo app.
Replies
1
Boosts
0
Views
1.4k
Activity
Jan ’23
(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
946
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.4k
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.3k
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
2k
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.6k
Activity
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.
Replies
1
Boosts
0
Views
1.4k
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.7k
Activity
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.
Replies
0
Boosts
0
Views
910
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.5k
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.2k
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.4k
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.9k
Activity
Sep ’22