Add export section in setting for saving and exporting settings by codebymini · Pull Request #476 · loopandlearn/LoopFollow · GitHub
Skip to content

Add export section in setting for saving and exporting settings#476

Merged
marionbarker merged 9 commits into
devfrom
export-settings
Dec 14, 2025
Merged

Add export section in setting for saving and exporting settings#476
marionbarker merged 9 commits into
devfrom
export-settings

Conversation

@codebymini

Copy link
Copy Markdown
Collaborator

Add Import/Export Settings Feature

This commit introduces a comprehensive settings import/export system that allows users to:

  • Export settings via QR codes for Nightscout, Remote, and Alarm configurations
  • Import settings by scanning QR codes with automatic validation and migration
  • Backup/restore via iCloud for complete settings preservation
  • Selective alarm export with custom alarm selection interface

Key Features:

  • QR code generation and scanning for easy settings transfer between devices
  • Version compatibility checking and migration support
  • iCloud integration for automatic settings backup
  • Smart conflict detection and user warnings for remote settings
  • Modular export system supporting individual or combined settings

Technical Implementation:

  • New ImportExportSettingsView with SwiftUI interface
  • ExportableSettings structs for each settings type with JSON serialization
  • SettingsMigrationManager for version compatibility
  • Integration into main settings menu with dedicated navigation
    This feature improves the user experience for setting up LoopFollow on multiple devices or after reinstalls.

@codebymini codebymini requested a review from bjorkert October 17, 2025 07:21
@marionbarker

Copy link
Copy Markdown
Collaborator

@codebymini codebymini marked this pull request as ready for review November 1, 2025 21:24
@codebymini

Copy link
Copy Markdown
Collaborator Author

I did not experience the wrong OTP error with a live setup and have not been able to recreate that issue.
The UI issues with the camera should be mitigated with d2f8e50 and 438a8cd

@codebymini codebymini linked an issue Nov 22, 2025 that may be closed by this pull request
@marionbarker

Copy link
Copy Markdown
Collaborator

Update Branch

First I merged dev (4.2.2) into export-settings.
✅ Worked for individual settings from one phone to another.
❌ Failed to read settings from the cloud - probably because upload failed.

Test for Trio and individual codes

Used the iPhone 8 just configured to test PR #466 as the export phone. I know this phone is properly configure for remote commands..
Used an SE 3rd gen phone running iOS 27.1 with no LoopFollow current installed.

  • ✅ Import Nightscout setup
  • ✅ Import Alarms (choose 4 with 1 being active)
    • The active alarm sounded on new phone and was snoozed
    • Took me a while to realize I had to snooze it on the donor phone too
  • ✅ Import Remote Settings
    • The Bolus Increment has finally updated to 0.1 U for MDT 515
    • Test that bolus amount must be > 0.1 and see it round to increments of 0.1
    • Successful remote bolus sent to Trio
    • ✅ remote meal
    • ✅ Temp Target did work
      • Future feature? The Temp Target does not have the saved preset from the LF donor phone, but there is also no saved Temp Target on the Trio phone
    • ✅ Override picked up saved overrides from Trio phone and worked

Test for Loop and Cloud

Confirm that LoopFollow on my personal phone can send remote commands to my personal Loop site.

Upload my settings to the cloud. It said it was successful.

Delete LoopFollow from my personal phone.

Build fresh

Try to import from the cloud and it says no settings found in the cloud.

Ooops.

@marionbarker

Copy link
Copy Markdown
Collaborator

Test revisited

I configured my phone the hard way and tapped on upload to cloud. Once again it said success.

I will see if I can download individually.

If I go to NS and try to import, it now shows me the settings.

  • Both NS and Remote Type are available to download from iCloud
  • Not going to do it on my real phone

I'm out of time now, but will do more testing.

  • I plan to use the Trio phones where I have 2 test phones already configured

@codebymini

Copy link
Copy Markdown
Collaborator Author

Mitigated that the settings will persist even if the app is deleted. Also added missing dexcom credentials to the saved settings

@marionbarker

Copy link
Copy Markdown
Collaborator

@marionbarker marionbarker left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approve from test.

@marionbarker marionbarker merged commit d719e55 into dev Dec 14, 2025
@marionbarker marionbarker deleted the export-settings branch December 14, 2025 05:23
MtlPhil pushed a commit to achkars-org/LoopFollow that referenced this pull request Mar 7, 2026
…andlearn#476)

* Add export section in setting for saving and exporting settings
* Add import buttons on first start and preview when importing
* Add done button to setup modals and clear first setup buttons when credentials is set
* Refactor QR code scanner to UIKit
* Add loading screen on startup
* Add Dexcom settings export and import functionality with persistent  iCloud support
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.

3 participants