-
Notifications
You must be signed in to change notification settings - Fork 0
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
Consider iCloud backup of snapshots #9
Comments
This would also require some settings interface on the React side to opt in and out. |
Here are some of my thoughts about how this could look... With regard to settingsThe React app would need to make a call to the Swift app (maybe When turning off iCloud it may be nice to offer the user a chance to keep or delete the saved snapshots that are on their device. This is much like what iOS does when signing out of iCloud. For that matter, we’ll need to know if iCloud is even available, and only show the opt-in setting if the device is logged in to iCloud. To send data to iCloudWhen saving a snapshot the React app would need to send it to Swift (maybe Upon deleting a snapshot (is this with moving to the trash or when emptying the trash?) React would need to inform Swift of the identifiers (keys in iCloud key-value store) to remove. This could be something like To read data from iCloudThe Swift app will be receiving updates from iCloud periodically and keeping track of changes. So, upon being asked to show the Open snapshot view Swift should send React the current saved snapshots (maybe in the app that menu item simply triggers In the end, while React stores saved snapshots in local storage, the true persistent store of saved snapshots will become iCloud, as maintained by the Swift app. |
This would require registering some sort of “listener” with the React app to get news of each storage (and deletion?) event and then reflecting those in iCloud. Each startup would also have to report all iCloud stored snapshots to the React app, where they could be reconciled with what is present there.
I think the current snapshot should never go to iCloud. That will be unique to each device. The iCloud backup will only affect saved snapshots.
What would be the impact of trashing a snapshot? Or of emptying the trash?
The text was updated successfully, but these errors were encountered: