Merge pull request #1319 from RCGV1/Expose-public-key

Fix issue where wrong pub key copied for connected node
This commit is contained in:
Garth Vander Houwen 2025-07-18 00:41:31 -07:00 committed by GitHub
commit fce244de2e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 33 additions and 31 deletions

View file

@ -32,23 +32,23 @@ jobs:
# Create build directory
mkdir -p ./build/dSYMs
# Build iOS App Archive with dSYMs
# Build for iOS Simulator to generate dSYMs without code signing
xcodebuild \
-workspace Meshtastic.xcworkspace \
-scheme Meshtastic \
-allowProvisioningUpdates \
-configuration Release \
-destination 'generic/platform=iOS' \
-archivePath ./build/Meshtastic.xcarchive \
-destination 'generic/platform=iOS Simulator' \
-derivedDataPath ./build/DerivedData \
DATADOG_CLIENT_TOKEN="${DATADOG_CLIENT_TOKEN}" \
DEBUG_INFORMATION_FORMAT=dwarf-with-dsym \
DWARF_DSYM_FOLDER_PATH=./build/dSYMs \
archive
CODE_SIGNING_REQUIRED=NO \
CODE_SIGNING_ALLOWED=NO \
build
- name: Extract dSYMs from Archive
- name: Extract dSYMs from Build
run: |
# Find and copy all dSYM files from the archive
find ./build/Meshtastic.xcarchive -name "*.dSYM" -exec cp -R {} ./build/dSYMs/ \;
# Find and copy all dSYM files from the build
find ./build/DerivedData -name "*.dSYM" -exec cp -R {} ./build/dSYMs/ \;
# List what we found
echo "Found dSYM files:"
@ -79,5 +79,5 @@ jobs:
name: dsym-files
path: |
./build/dSYMs
./build/Meshtastic.xcarchive
./build/DerivedData
retention-days: 30

View file

@ -43,7 +43,7 @@ struct MeshtasticAppleApp: App {
env: environment,
site: .us5
),
trackingConsent: UserDefaults.usageDataAndCrashReporting ? .granted : .notGranted,
trackingConsent: UserDefaults.usageDataAndCrashReporting ? .granted : .notGranted
)
DatadogCrashReporting.CrashReporting.enable()
Logs.enable()

View file

@ -115,30 +115,32 @@ struct NodeDetail: View {
.textSelection(.enabled)
}
.accessibilityElement(children: .combine)
if node.user?.keyMatch ?? false {
if let publicKey = node.user?.publicKey {
HStack {
Label {
Text("Public Key")
} icon: {
Image(systemName: "lock.fill")
.foregroundColor(.green)
}
Spacer()
Button(action: {
context.perform {
UIPasteboard.general.string = publicKey.base64EncodedString()
let connectedNode = getNodeInfo(id: BLEManager.shared.connectedPeripheral?.num ?? 0, context: context)
if let user = node.user, user.keyMatch {
let publicKey = node.num == connectedNode?.num
? node.securityConfig?.publicKey?.base64EncodedString() ?? ""
: user.publicKey?.base64EncodedString() ?? ""
HStack {
Label {
Text("Public Key")
} icon: {
Image(systemName: "lock.fill")
.foregroundColor(.green)
}
}) {
HStack {
Image(systemName: "key.horizontal.fill")
Text("Copy")
Spacer()
Button(action: {
context.perform {
UIPasteboard.general.string = publicKey
}
}) {
HStack {
Image(systemName: "key.horizontal.fill")
Text("Copy")
}
}
}
.accessibilityElement(children: .combine)
}
.accessibilityElement(children: .combine)
}
}
if let metadata = node.metadata {
HStack {
Label {