Comments (11)
From what I've been able to find, it looks like you're being returned the .occuranceDate instead of the .startDate for a recurring event. But nowhere in your code do you ask for that. (that I could see).
Also if it helps, the issue is confined to future events only. In my own app I also retrieve past events & the same recurring events are reported correctly with .startDate once they are "before" current Date()
I just pray there's a solution for SwiftUI / eventKit version as my personal app needs this to work :)
from ekeventkit.example.
Hi, this happens using my example or in your app? I haven't tried recurring events much but I guess it isn't EventKit bug since this frameworks has been there for years and I believe such serious issue would have been fixed by now :)
from ekeventkit.example.
Hi
It will happen in both my app ( which is adapted from your example ) AND with your clean Swiftui example downloaded directly from GitHub and run on the simulator (IOS 14).
PS: the recurring event doesn't have to have been created from your code. So has nothing to do with the way the event was created. A recurring event made with IOS calendar app will produce the same result.
from ekeventkit.example.
just wanted to add because I think it provides hope that the issue is fixable. This problem with recurring events is confined to your SwiftUI example. There's no such problem with the UIKit example you provide.
I hope you are able to pin it down. ;)
from ekeventkit.example.
Thanks for the info. I briefly checked UIKit version yesterday but did not find the issue you described. Interesting that it only happens with SwiftUI version.
from ekeventkit.example.
I checked the relevant code and it seems to same to me. The occurrenceDate
should be the date of the first event in the series, see - https://developer.apple.com/documentation/eventkit/ekevent/1507244-occurrencedate
from ekeventkit.example.
Oh no that's tragic 😭... do you now believe this to be a bug in IOS/ Eventkit rather than an issue with your example code? Will you be able to report it to Apple maybe?
from ekeventkit.example.
I did another check and this time created daily repeat event and checked it in both project. You are right, SwiftUI shows exactly the same relative time for all events. I am pretty sure this is some dumb mistake that I made.
from ekeventkit.example.
Okay, it is fixed. The issue was in the EKEvent
extension to make it conform to Identifiable
. I removed it, added manual id
to ForEach
and not it works exactly as UIKit version. @my4paws
from ekeventkit.example.
Confirmed it's fixed.
Awesome work. Thank you so much!
from ekeventkit.example.
Great`
from ekeventkit.example.
Related Issues (9)
- Any chance of a swiftUI version of this? I've found information of EventKit & EventKitui rarer than unicorn S*!t HOT 4
- Relative time giving odd results HOT 4
- Suggestion to break list into day segments HOT 9
- Selected Calendars not being persisted HOT 1
- EKEventEditViewController initial focus HOT 2
- Refresh events when app is reopened/brought to foreground HOT 12
- Errors when launching the app for the first time HOT 14
- iOS 15, "bottom sheet" HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ekeventkit.example.