Artificial-Pancreas / iAPS

MIT License
164 stars 682 forks source link

Backup iAPS settings #416

Open francescaneri opened 6 months ago

francescaneri commented 6 months ago

If it was possible to export the complete iAPS configuration file to be able to re-import it in case of need (e.g. reinstalling the app on the phone or the phone being stolen), a sort of backup. You could save the files on iPhone or iCloud and recover them later so as not to lose all the settings stored so far. currently there is in debug options but it is not complete. As is currently possible in androidAPS. Thanks

Jon-b-m commented 6 months ago

It is backed up to Apple Cloud actually, settings and all.

LiroyvH commented 6 months ago

@Jon-b-m You mean within the full device backup (if you make those to iCloud anyway)?

Jon-b-m commented 6 months ago

Yes

francescaneri commented 6 months ago

... What if I delete the app due to some inactivity, and reinstall it, do I have to enter all the settings?

LiroyvH commented 6 months ago

@Jon-b-m Ok, but that's not ideal as the only way to restore data from a device backup (iCloud or AMB) is to restore the entire backup (some third-party solutions exempt).

Ideally, iAPS generates a settings backup and writes it to iCloud by itself (app data) or allows the user to easily import/export a backupfile. (Using Finder/Files for manually backing up and restoring the JSON files is probably too difficult for many and I'm not sure if it contains all settings.)

Jon-b-m commented 6 months ago

Actually no, you don’t need to use third party solutions, but these comments are perhaps getting slightly out of context now. Anyway the built in ICloud backup is just fine for this. You can also use the newer Apple file transfer (BLE?) for transfering everything to your new device when getting a new phone.

Jon-b-m commented 6 months ago

Currently all your settings and profiles are also backup to Nightscout, meaning you have an extra backup here, just in case

Jon-b-m commented 6 months ago

However I’m not opposed to introducing yet another backup within iAPS. It’s just a lot of work for something we already sort of have…

Jon-b-m commented 6 months ago

If you or anyone else were to pursue this I think I would suggest looking into CloudKit integration with CoreData, but as of now I will not begin working with this myself, for the reasons stated above.