Skip to content

Commit 5530cd0

Browse files
committed
App version
1 parent 466b3b8 commit 5530cd0

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

LoopFollow/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<key>CFBundlePackageType</key>
2222
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
2323
<key>CFBundleShortVersionString</key>
24-
<string>1.0</string>
24+
<string>2.0.0</string>
2525
<key>CFBundleVersion</key>
2626
<string>1</string>
2727
<key>LSApplicationCategoryType</key>

LoopFollow/ViewControllers/SettingsViewController.swift

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -247,14 +247,21 @@ class SettingsViewController: FormViewController {
247247

248248
}
249249

250-
251-
252-
+++ Section(header: "App Expiration", footer: String(expiration.description))
253-
250+
+++ Section(header: getAppVersion(), footer: "")
251+
252+
+++ Section(header: "App Expiration", footer: String(expiration.description))
253+
254254
showHideNSDetails()
255255
checkNightscoutStatus()
256256
}
257257

258+
func getAppVersion() -> String {
259+
if let version = Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String {
260+
return "App Version: \(version)"
261+
}
262+
return "Version Unknown"
263+
}
264+
258265
func updateStatusLabel(error: NightscoutUtils.NightscoutError?) {
259266
if let error = error {
260267
switch error {

0 commit comments

Comments
 (0)