Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync Calendar Issue #138

Closed
shishirchulliyil opened this issue Jan 16, 2023 · 5 comments
Closed

Sync Calendar Issue #138

shishirchulliyil opened this issue Jan 16, 2023 · 5 comments

Comments

@shishirchulliyil
Copy link

Hi @natelindev, we are trying to sync our application events to Apple Device Calendar.

  1. We have a scheduled auto sync, and on every sync we delete all the calendar objects using deleteCalendarObject API.
  2. We re-insert using the createCalendarObject API.
  3. But on every auto sync, duplicate events are showing on Apple Devices, and it is not consistent on all device. Some device shows duplicate events on the apple calendar app and some don't.
  4. Just to note, when we visit iCloud.com/calendar, we see there are single events, but when the auto sync is happening we see the events getting duplicated, but as soon as the auto sync completes and we refresh the browser tab, we see again only the single events which is the expected result.

We have used the same API for Outlook and Google Calendar also, but we don't see any duplicate events there. Is our approach (deleting and re adding Calendar Objects) wrong for Auto Sync or is there a better way to achieve this? Is there any caching issue which we might be dealing with the Apple devices?

We also tried using the syncCalendars API but we are not sure what happens, does the calendar automatically syncs with the updated data or do we have to do something with the returned response from the API?

@strukturart
Copy link

#124

I use https://tsdav.vercel.app/docs/caldav/syncCalendars to test if there was a change in a calendar if yes, then I delete all events locally and fetch all calendar data again.

@natelindev
Copy link
Owner

#124

I use https://tsdav.vercel.app/docs/caldav/syncCalendars to test if there was a change in a calendar if yes, then I delete all events locally and fetch all calendar data again.

This is very ineffecient, I will provide an example later for all use cases.

@natelindev
Copy link
Owner

Currently the documentation related to syncing is not very clear, I will provide some detail examples and code snippets to make it more clear.

@strukturart
Copy link

@natelindev can you please explain how to find out which calendar entries are new, updated or deleted?

@natelindev
Copy link
Owner

fixed in v2.0.9, please read the lastest docs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants