Skip to content
This repository was archived by the owner on Mar 7, 2026. It is now read-only.

Commit cb9b877

Browse files
authored
Fix: Use display names for files (read-only name prop) + wrap deprecated Archive init in do-catch
1 parent a39ef6c commit cb9b877

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

Sources/prostore/views/CertificateView.swift

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ struct CertificateView: View {
66

77
@State private var p12 = FileItem()
88
@State private var prov = FileItem()
9+
@State private var p12Name: String = ""
10+
@State private var provName: String = ""
911
@State private var p12Password = ""
1012
@State private var isProcessing = false
1113
@State private var customStatusMessage = ""
@@ -87,7 +89,7 @@ struct CertificateView: View {
8789
.foregroundColor(.blue)
8890
Text("P12")
8991
Spacer()
90-
Text(p12.name.isEmpty ? "No file selected" : p12.name)
92+
Text(p12Name.isEmpty ? "No file selected" : p12Name) // Use p12Name here
9193
.font(.caption)
9294
.lineLimit(1)
9395
.foregroundColor(.secondary)
@@ -107,7 +109,7 @@ struct CertificateView: View {
107109
.foregroundColor(.blue)
108110
Text("MobileProvision")
109111
Spacer()
110-
Text(prov.name.isEmpty ? "No file selected" : prov.name)
112+
Text(provName.isEmpty ? "No file selected" : provName) // Use provName here
111113
.font(.caption)
112114
.lineLimit(1)
113115
.foregroundColor(.secondary)
@@ -178,10 +180,10 @@ struct CertificateView: View {
178180
switch kind {
179181
case .p12:
180182
p12.url = url
181-
p12.name = url.lastPathComponent
183+
p12Name = url.lastPathComponent // Set display name here instead
182184
case .prov:
183185
prov.url = url
184-
prov.name = url.lastPathComponent
186+
provName = url.lastPathComponent // Same for prov
185187
}
186188
})
187189
}

0 commit comments

Comments
 (0)