builttoroam / device_calendar

A cross platform plugin for modifying calendars on the user's device
https://pub.dev/packages/device_calendar
BSD 3-Clause "New" or "Revised" License
259 stars 258 forks source link

Events created on Google calendar on iOS reflects only if I launch apple calendar first and then open the app #534

Open Praveena0989 opened 3 months ago

Praveena0989 commented 3 months ago

Describe the bug Events created on Google calendar on iOS won't come in device calendar API response, and it will start coming once I open the apple calendar app and then open my app. Is this expected behavior?

lukemmtt commented 6 days ago

To close the loop here, this is normal behavior for iOS devices, and is an OS nuance, not something specific to device_calendar or Flutter.

Specifically, Google Calendar does sync with the Apple Calendar automatically in the background (based on the user's refresh frequency in iOS Settings app > Calendar), but even with the most aggressive setting there, there are still some delays, and the only way to force a sync is to open the iOS Calendar app.

I hope that helps. This issue should now be closed.

Praveena0989 commented 5 days ago

I fixed it by calling refreshSourcesIfNecessary()

lukemmtt commented 5 days ago

Good to know, thanks for sharing!