SwiftUI port of the Android app with the desktop feature set; built on Linux, linked and signed on a jailbroken iPhone. History imported from the standalone repo. Co-Authored-By: Claude Opus 5.5 <[email protected]>
17 lines
819 B
Swift
17 lines
819 B
Swift
import Foundation
|
|
|
|
/// Version info from Info.plist (set by build.sh from the VERSION file and the git commit count).
|
|
enum AppVersion {
|
|
static var version: String { Bundle.main.object(forInfoDictionaryKey: "CFBundleShortVersionString") as? String ?? "?" }
|
|
static var build: String { Bundle.main.object(forInfoDictionaryKey: "CFBundleVersion") as? String ?? "?" }
|
|
|
|
/// "Updated to x.y.z" once after an update (nil on first install or same version).
|
|
static func updateNote() -> String? {
|
|
let key = "last_version"
|
|
let now = "\(version) (\(build))"
|
|
let last = UserDefaults.standard.string(forKey: key)
|
|
UserDefaults.standard.set(now, forKey: key)
|
|
guard let last, last != now else { return nil }
|
|
return "Updated to Mulberry \(version) (build \(build))"
|
|
}
|
|
}
|