builttoroam/device_calendar

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

Opened this issue · 4 comments

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?

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.

I fixed it by calling refreshSourcesIfNecessary()

Good to know, thanks for sharing!

This seems to be an important calendar related API to implement, even if it only concerns iOS.

Reference:
https://developer.apple.com/documentation/eventkit/ekeventstore/1507421-refreshsourcesifnecessary