Skip to content

[WIP] feat: add a method to force sync the syncEngine without deleting the local data - #524

Draft
MojtabaHs wants to merge 1 commit into
pointfreeco:mainfrom
MojtabaHs:force-refresh-syncengine
Draft

[WIP] feat: add a method to force sync the syncEngine without deleting the local data#524
MojtabaHs wants to merge 1 commit into
pointfreeco:mainfrom
MojtabaHs:force-refresh-syncengine

Conversation

@MojtabaHs

Copy link
Copy Markdown
Contributor

Based on the very recent conversation in Slack, I found that tearing down and setting up the sync engine forces it to synchronize changes with CloudKit.

I think the underlying issue is likely related to the sync triggers, but this workaround works for now.

Also, to keep a single source of truth, I reused the existing implementation by adding an argument to the existing function instead of introducing a separate code path.

Please take a look, test, and let me know what you think.

@MojtabaHs MojtabaHs changed the title feat: add a method to force sync the syncEngine without deleting the local data [WIP] feat: add a method to force sync the syncEngine without deleting the local data Aug 16, 2026
@MojtabaHs

Copy link
Copy Markdown
Contributor Author

Update:
more aggressive testing shows that it can leave triggers dangling and throw:
SQLite error 1: no such trigger sqlitedata_icloud_after_primary_key_change_on...

The data also becomes unstable, showing different states after each refresh.

@MojtabaHs
MojtabaHs marked this pull request as draft August 16, 2026 18:05
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

Successfully merging this pull request may close these issues.

1 participant