Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 57 additions & 9 deletions ExampleApp/ExampleApp/ContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ struct ContentView: View {
.padding()
}

// Session prompt (if registered but no active session)
if isDeviceRegistered && !hasActiveSession {
// Session prompt (if registered but no active session and no photo showing)
if isDeviceRegistered && !hasActiveSession && lastCapturedPhoto == nil {
sessionPrompt
.padding()
}
Expand Down Expand Up @@ -424,14 +424,55 @@ struct ContentView: View {
}
}

Button("Dismiss") {
lastCapturedPhoto = nil
savedPhotoURL = nil
trustToken = nil
sidecarURL = nil
// Post-capture guidance
if sidecarURL != nil {
Divider()
.background(.gray.opacity(0.5))

VStack(spacing: 8) {
HStack {
Image(systemName: "folder.fill")
.foregroundColor(.blue)
Text("Saved to Files → SignedShot")
.font(.caption)
.foregroundColor(.white)
}

Text("Verify via CLI:")
.font(.system(size: 10))
.foregroundColor(.gray)

Text("$ signedshot verify <photo> <sidecar>")
.font(.system(size: 10, design: .monospaced))
.foregroundColor(.gray)
}
}

HStack(spacing: 16) {
if sidecarURL != nil {
Button(action: openFilesApp) {
HStack {
Image(systemName: "arrow.up.forward.app")
Text("Open in Files")
}
.font(.caption)
.foregroundColor(.white)
.padding(.horizontal, 16)
.padding(.vertical, 8)
.background(.blue)
.cornerRadius(8)
}
}

Button("Dismiss") {
lastCapturedPhoto = nil
savedPhotoURL = nil
trustToken = nil
sidecarURL = nil
}
.font(.caption)
.foregroundColor(.gray)
}
.font(.caption)
.foregroundColor(.blue)
.padding(.top, 4)
}
.padding()
Expand Down Expand Up @@ -634,6 +675,13 @@ struct ContentView: View {
}
}

private func openFilesApp() {
// Open the Files app to the SignedShot folder
if let url = URL(string: "shareddocuments://") {
UIApplication.shared.open(url)
}
}

private func testSecureEnclave() async {
isTestingEnclave = true
enclaveTestResult = nil
Expand Down