Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions G7SensorKit.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
objects = {

/* Begin PBXBuildFile section */
B60BB2E42BC649DA00D2BB39 /* Bundle.swift in Sources */ = {isa = PBXBuildFile; fileRef = B60BB2E32BC649DA00D2BB39 /* Bundle.swift */; };
C109F14A291ECCE2008EA5B6 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = C109F149291ECCE2008EA5B6 /* Assets.xcassets */; };
C109F14C291ED66F008EA5B6 /* G7GlucoseMessageTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C109F14B291ED66F008EA5B6 /* G7GlucoseMessageTests.swift */; };
C139829829295D7D0047DB5F /* HKUnit.swift in Sources */ = {isa = PBXBuildFile; fileRef = C17F514A291EB6F000555EB5 /* HKUnit.swift */; };
Expand Down Expand Up @@ -106,6 +107,7 @@
/* End PBXCopyFilesBuildPhase section */

/* Begin PBXFileReference section */
B60BB2E32BC649DA00D2BB39 /* Bundle.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Bundle.swift; path = G7SensorKitUI/Extensions/Bundle.swift; sourceTree = SOURCE_ROOT; };
C1086B0E29C9169100D46E65 /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/Localizable.strings; sourceTree = "<group>"; };
C1086B0F29C9169100D46E65 /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/Localizable.strings; sourceTree = "<group>"; };
C109F149291ECCE2008EA5B6 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
Expand Down Expand Up @@ -366,6 +368,7 @@
C17F5154291EBD7100555EB5 /* Extensions */ = {
isa = PBXGroup;
children = (
B60BB2E32BC649DA00D2BB39 /* Bundle.swift */,
C17F5155291EBD8600555EB5 /* Image.swift */,
);
path = Extensions;
Expand Down Expand Up @@ -636,6 +639,7 @@
buildActionMask = 2147483647;
files = (
C17F5108291EAC9D00555EB5 /* G7SettingsView.swift in Sources */,
B60BB2E42BC649DA00D2BB39 /* Bundle.swift in Sources */,
C17F5157291EBD9900555EB5 /* TimeInterval.swift in Sources */,
C19C9F4E29C91C4C00A6D3D0 /* LocalizedString.swift in Sources */,
C17F5156291EBD8600555EB5 /* Image.swift in Sources */,
Expand Down
15 changes: 15 additions & 0 deletions G7SensorKitUI/Extensions/Bundle.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
//
// Bundle.swift
// G7SensorKit
//
// Created by Darin Krauss on 1/23/21.
// Copyright © 2021 LoopKit Authors. All rights reserved.
//

import Foundation

extension Bundle {
var bundleDisplayName: String {
return object(forInfoDictionaryKey: "CFBundleDisplayName") as! String
}
}
1 change: 1 addition & 0 deletions G7SensorKitUI/G7CGMManager/G7UICoordinator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ class G7UICoordinator: UINavigationController, CGMManagerOnboarding, CompletionN
}
}
)
.environment(\.appName, Bundle.main.bundleDisplayName)
let hostingController = DismissibleHostingController(content: rootView, colorPalette: colorPalette)
hostingController.navigationItem.largeTitleDisplayMode = .never
hostingController.title = nil
Expand Down
4 changes: 3 additions & 1 deletion G7SensorKitUI/Views/G7StartupView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ struct G7StartupView: View {
var didContinue: (() -> Void)?
var didCancel: (() -> Void)?

@Environment(\.appName) private var appName

var body: some View {
VStack(alignment: .center, spacing: 20) {
Spacer()
Expand All @@ -26,7 +28,7 @@ struct G7StartupView: View {
.frame(height: 120)
.padding(.horizontal)
}.frame(maxWidth: .infinity)
Text(LocalizedString("Loop can read G7 CGM data, but you must still use the Dexcom G7 App for pairing, calibration, and other sensor management.", comment: "Descriptive text on G7StartupView"))
Text(String(format: LocalizedString("%1$@ can read G7 CGM data, but you must still use the Dexcom G7 App for pairing, calibration, and other sensor management.", comment: "Descriptive text on G7StartupView (1: appName)"), self.appName))
.fixedSize(horizontal: false, vertical: true)
.foregroundColor(.secondary)
Spacer()
Expand Down