From 5b903f43f9026f5bb7c51611ebe72e9d9eb2d505 Mon Sep 17 00:00:00 2001 From: Jamie Keene Date: Tue, 2 Jan 2024 23:29:54 +0000 Subject: [PATCH] Add link to Dexcom app in G7 settings I found myself missing the 'Open app' button from the G6, and that my muscle memory kept expecting it to be there, so in this PR I've added it into the G7 management screen. I opted to create a new section rather than include it with the other management buttons beneath to try to prevent users accidentally tapping the more destructive actions. --- G7SensorKitUI/Views/G7SettingsView.swift | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/G7SensorKitUI/Views/G7SettingsView.swift b/G7SensorKitUI/Views/G7SettingsView.swift index 489ba22..b5b50e4 100644 --- a/G7SensorKitUI/Views/G7SettingsView.swift +++ b/G7SensorKitUI/Views/G7SettingsView.swift @@ -123,6 +123,14 @@ struct G7SettingsView: View { Toggle(LocalizedString("Upload Readings", comment: "title for g7 config settings to upload readings"), isOn: $viewModel.uploadReadings) } } + + Section () { + Button(LocalizedString("Open Dexcom App", comment:"Opens the dexcom G7 app to allow users to manage active sensors"), action: { + if let appURL = URL(string: "dexcomg7://") { + UIApplication.shared.open(appURL) + } + }) + } Section () { if !self.viewModel.scanning {