version label

This commit is contained in:
leminlimez committed 2025-06-01 01:13:43 -04:00
1 parent 89704a4238
commit 49948a3429
2 files changed
+18

No files matched your search

+14
View File
@@ -0,0 +1,14 @@
//
// Bundle++.swift
// Pocket Poster
//
// Created by lemin on 6/1/25.
//
import Foundation
extension Bundle {
var releaseVersionNumber: String? {
return infoDictionary?["CFBundleShortVersionString"] as? String
}
}
+4
View File
@@ -12,6 +12,8 @@ struct ContentView: View {
// Prefs
@AppStorage("pbHash") var pbHash: String = ""
private let buildNumber = Bundle.main.infoDictionary?["CFBundleVersion"] as? String ?? ""
@State var showTendiesImporter: Bool = false
@State var selectedTendies: [URL]? = nil
@@ -22,6 +24,8 @@ struct ContentView: View {
var body: some View {
NavigationStack {
ScrollView {
Label("Version \(Bundle.main.releaseVersionNumber ?? "UNKNOWN") (\(Int(buildNumber) != 0 ? "\(buildNumber)" : NSLocalizedString("Release", comment:"")))", systemImage: "info.circle.fill")
.font(.caption)
Section {
HStack {
Text("App Hash:")