diff --git a/.github/workflows/_swift.yml b/.github/workflows/_swift.yml
index 0c69598f2..657cd0dd5 100644
--- a/.github/workflows/_swift.yml
+++ b/.github/workflows/_swift.yml
@@ -113,6 +113,7 @@ jobs:
if [ "${{ matrix.platform }}" = "iOS" ]; then
# Build archive
xcodebuild archive \
+ GIT_SHA=${GITHUB_SHA} \
-skipMacroValidation \
-archivePath $RUNNER_TEMP/Firezone.xcarchive \
-configuration Release \
@@ -131,6 +132,7 @@ jobs:
elif [ "${{ matrix.platform }}" = "macOS" ]; then
# Build app bundle
xcodebuild build \
+ GIT_SHA=${GITHUB_SHA} \
-skipMacroValidation \
-configuration Release \
-scheme Firezone \
diff --git a/swift/apple/Firezone/Info.plist b/swift/apple/Firezone/Info.plist
index a9ca532ad..92b464e8e 100644
--- a/swift/apple/Firezone/Info.plist
+++ b/swift/apple/Firezone/Info.plist
@@ -19,5 +19,7 @@
$(APP_GROUP_ID)
ITSAppUsesNonExemptEncryption
+ GitSha
+ $(GIT_SHA)
diff --git a/swift/apple/FirezoneKit/Sources/FirezoneKit/Helpers/AppInfoPlistConstants.swift b/swift/apple/FirezoneKit/Sources/FirezoneKit/Helpers/AppInfoPlistConstants.swift
index 07fec59e4..012603fd9 100644
--- a/swift/apple/FirezoneKit/Sources/FirezoneKit/Helpers/AppInfoPlistConstants.swift
+++ b/swift/apple/FirezoneKit/Sources/FirezoneKit/Helpers/AppInfoPlistConstants.swift
@@ -7,6 +7,14 @@
import Foundation
struct AppInfoPlistConstants {
+ static var gitSha: String {
+ guard let gitSha = Bundle.main.object(forInfoDictionaryKey: "GitSha") as? String,
+ !gitSha.isEmpty
+ else { return "unknown" }
+
+ return String(gitSha.prefix(8))
+ }
+
static var appGroupId: String {
guard let appGroupId = Bundle.main.object(forInfoDictionaryKey: "AppGroupIdentifier") as? String
else {
diff --git a/swift/apple/FirezoneKit/Sources/FirezoneKit/Views/SettingsView.swift b/swift/apple/FirezoneKit/Sources/FirezoneKit/Views/SettingsView.swift
index 231d45488..a573853e2 100644
--- a/swift/apple/FirezoneKit/Sources/FirezoneKit/Views/SettingsView.swift
+++ b/swift/apple/FirezoneKit/Sources/FirezoneKit/Views/SettingsView.swift
@@ -365,6 +365,12 @@ public struct SettingsView: View {
Spacer()
}
Spacer()
+ HStack {
+ Text("Build: \(AppInfoPlistConstants.gitSha)")
+ .textSelection(.enabled)
+ .foregroundColor(.gray)
+ Spacer()
+ }.padding([.leading, .bottom], 20)
}
#elseif os(iOS)
VStack {
@@ -432,6 +438,13 @@ public struct SettingsView: View {
footer: { Text(FootnoteText.forAdvanced) }
)
}
+ Spacer()
+ HStack {
+ Text("Build: \(AppInfoPlistConstants.gitSha)")
+ .textSelection(.enabled)
+ .foregroundColor(.gray)
+ Spacer()
+ }.padding([.leading, .bottom], 20)
}
#endif
}
diff --git a/website/src/components/Changelog/Apple.tsx b/website/src/components/Changelog/Apple.tsx
index 4bf32eaf8..2dcef1b72 100644
--- a/website/src/components/Changelog/Apple.tsx
+++ b/website/src/components/Changelog/Apple.tsx
@@ -9,6 +9,15 @@ export default function Apple() {
href="https://apps.apple.com/us/app/firezone/id6443661826"
title="macOS / iOS"
>
+ {/*
+
+
+
+ Shows the Git SHA corresponding to the build on the Settings -> Advanced screen.
+
+
+
+ */}