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

Commit bbeee6f

Browse files
authored
Rename ProStoreTools to 'signer'
1 parent 9b028c3 commit bbeee6f

4 files changed

Lines changed: 8 additions & 8 deletions

File tree

Sources/prostore/certificates/OfficialCertsDownloader.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ struct LoyahdevCertificatesView: View {
293293
guard let pw = successPw else {
294294
throw NSError(domain: "Password", code: 1, userInfo: [NSLocalizedDescriptionKey: "Password check failed"])
295295
}
296-
let exp = ProStoreTools.getExpirationDate(provData: provDataLocal)
296+
let exp = signer.getExpirationDate(provData: provDataLocal)
297297
let dispName = CertificatesManager.getCertificateName(mobileProvisionData: provDataLocal) ?? cleanName(release.name)
298298
await MainActor.run {
299299
self.p12Data = p12DataLocal
@@ -522,7 +522,7 @@ struct OfficialCertificatesView: View {
522522
let checkResult = CertificatesManager.check(p12Data: p12DataLocal, password: pwString, mobileProvisionData: provDataLocal)
523523
switch checkResult {
524524
case .success(.success):
525-
let exp = ProStoreTools.getExpirationDate(provData: provDataLocal)
525+
let exp = signer.getExpirationDate(provData: provDataLocal)
526526
let dispName = CertificatesManager.getCertificateName(mobileProvisionData: provDataLocal) ?? item.path
527527
await MainActor.run {
528528
self.p12Data = p12DataLocal
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import Foundation
22
import ZIPFoundation
33
import ZsignSwift
44

5-
public enum ProStoreTools {
5+
public enum signer {
66
public static func sign(
77
ipaURL: URL,
88
p12URL: URL,
@@ -159,11 +159,11 @@ fileprivate class SigningManager {
159159
static func findAppBundle(in payloadDir: URL) throws -> URL {
160160
let fm = FileManager.default
161161
guard fm.fileExists(atPath: payloadDir.path) else {
162-
throw NSError(domain: "ProStoreTools", code: 1, userInfo: [NSLocalizedDescriptionKey: "Payload not found"])
162+
throw NSError(domain: "signer", code: 1, userInfo: [NSLocalizedDescriptionKey: "Payload not found"])
163163
}
164164
let contents = try fm.contentsOfDirectory(atPath: payloadDir.path)
165165
guard let appName = contents.first(where: { $0.hasSuffix(".app") }) else {
166-
throw NSError(domain: "ProStoreTools", code: 2, userInfo: [NSLocalizedDescriptionKey: "No .app bundle in Payload"])
166+
throw NSError(domain: "signer", code: 2, userInfo: [NSLocalizedDescriptionKey: "No .app bundle in Payload"])
167167
}
168168
return payloadDir.appendingPathComponent(appName)
169169
}

Sources/prostore/views/CertificateView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ struct CertificateView: View {
259259
let folderName = cert.folderName
260260
let certDir = CertificateFileManager.shared.certificatesDirectory.appendingPathComponent(folderName)
261261
let provURL = certDir.appendingPathComponent("profile.mobileprovision")
262-
let expiry = ProStoreTools.getExpirationDate(provURL: provURL)
262+
let expiry = signer.getExpirationDate(provURL: provURL)
263263
certExpiries[folderName] = expiry
264264
}
265265
}

Sources/prostore/views/SignerView.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ struct SignerView: View {
139139
selectedCertificateName = "Custom Certificate"
140140
}
141141
let provURL = certDir.appendingPathComponent("profile.mobileprovision")
142-
if let expiry = ProStoreTools.getExpirationDate(provURL: provURL) {
142+
if let expiry = signer.getExpirationDate(provURL: provURL) {
143143
let now = Date()
144144
let components = Calendar.current.dateComponents([.day], from: now, to: expiry)
145145
let days = components.day ?? 0
@@ -205,7 +205,7 @@ struct SignerView: View {
205205
barColor = .blue
206206
isError = false
207207
errorDetails = ""
208-
ProStoreTools.sign(
208+
signer.sign(
209209
ipaURL: ipaURL,
210210
p12URL: p12URL,
211211
provURL: provURL,

0 commit comments

Comments
 (0)