Skip to content

Commit 79959ba

Browse files
committed
Automatic bolus dosing strategy
1 parent 412a985 commit 79959ba

20 files changed

+1004
-146
lines changed

Common/Extensions/NSBundle.swift

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,17 @@ extension Bundle {
1717
var bundleDisplayName: String {
1818
return object(forInfoDictionaryKey: "CFBundleDisplayName") as! String
1919
}
20+
21+
var featureSpecifier: String? {
22+
return object(forInfoDictionaryKey: "com.loopkit.Loop.featureSpecifier") as? String
23+
}
2024

2125
var localizedNameAndVersion: String {
22-
return String(format: NSLocalizedString("%1$@ v%2$@", comment: "The format string for the app name and version number. (1: bundle name)(2: bundle version)"), bundleDisplayName, shortVersionString)
26+
var displayName = bundleDisplayName
27+
if let featureSpecifier = featureSpecifier {
28+
displayName += " (\(featureSpecifier))"
29+
}
30+
return String(format: NSLocalizedString("%1$@ v%2$@", comment: "The format string for the app name and version number. (1: bundle name)(2: bundle version)"), displayName, shortVersionString)
2331
}
2432

2533
private var mainAppBundleIdentifier: String? {

0 commit comments

Comments
 (0)