|
@@ -948,7 +948,29 @@ final class BaseAPSManager: APSManager, Injectable {
|
|
|
let buildDate = Bundle.main.buildDate
|
|
let buildDate = Bundle.main.buildDate
|
|
|
let version = Bundle.main.releaseVersionNumber
|
|
let version = Bundle.main.releaseVersionNumber
|
|
|
let build = Bundle.main.buildVersionNumber
|
|
let build = Bundle.main.buildVersionNumber
|
|
|
- let branch = Bundle.main.infoDictionary?["BuildBranch"] as? String ?? ""
|
|
|
|
|
|
|
+
|
|
|
|
|
+ // Read branch information from branch.txt instead of infoDictionary
|
|
|
|
|
+ var branch = "Unknown"
|
|
|
|
|
+ if let branchFileURL = Bundle.main.url(forResource: "branch", withExtension: "txt"),
|
|
|
|
|
+ let branchFileContent = try? String(contentsOf: branchFileURL)
|
|
|
|
|
+ {
|
|
|
|
|
+ let lines = branchFileContent.components(separatedBy: .newlines)
|
|
|
|
|
+ for line in lines {
|
|
|
|
|
+ let components = line.components(separatedBy: "=")
|
|
|
|
|
+ if components.count == 2 {
|
|
|
|
|
+ let key = components[0].trimmingCharacters(in: .whitespaces)
|
|
|
|
|
+ let value = components[1].trimmingCharacters(in: .whitespaces)
|
|
|
|
|
+
|
|
|
|
|
+ if key == "BRANCH" {
|
|
|
|
|
+ branch = value
|
|
|
|
|
+ break
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ } else {
|
|
|
|
|
+ branch = "Unknown"
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
let copyrightNotice_ = Bundle.main.infoDictionary?["NSHumanReadableCopyright"] as? String ?? ""
|
|
let copyrightNotice_ = Bundle.main.infoDictionary?["NSHumanReadableCopyright"] as? String ?? ""
|
|
|
let pump_ = pumpManager?.localizedTitle ?? ""
|
|
let pump_ = pumpManager?.localizedTitle ?? ""
|
|
|
let cgm = settingsManager.settings.cgm
|
|
let cgm = settingsManager.settings.cgm
|