Skip to content

Commit d0454ae

Browse files
committed
fix: fix some sidestore nightly issue
1 parent 6f21501 commit d0454ae

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

AltStore/SceneDelegate.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,9 @@ final class SceneDelegate: UIResponder, UIWindowSceneDelegate
6363
// Flush any .ipa import that arrived before the scene was active (cold launch).
6464
guard let url = self.pendingImportIPAURL else { return }
6565
self.pendingImportIPAURL = nil
66-
NotificationCenter.default.post(name: AppDelegate.importAppDeepLinkNotification, object: nil, userInfo: [AppDelegate.importAppDeepLinkURLKey: url])
66+
DispatchQueue.main.asyncAfter(deadline: .now() + 1.0) {
67+
NotificationCenter.default.post(name: AppDelegate.importAppDeepLinkNotification, object: nil, userInfo: [AppDelegate.importAppDeepLinkURLKey: url])
68+
}
6769
}
6870

6971
func sceneDidEnterBackground(_ scene: UIScene)

SideStore/Core/Certificates/CertificateManager.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,8 @@ public final class CertificateManager: @unchecked Sendable {
151151
if let data = Keychain.shared[certificateSerial: serialNumber] {
152152
if data.isPKCS12 {
153153
let savedPassword = getCertificateMetadata(for: serialNumber)?["machineIdentifier"]
154-
if let cert = try? CertificateStore.load(data, password: savedPassword) {
154+
var cert = (try? CertificateStore.load(data, password: savedPassword)) ?? (try? CertificateStore.load(data, password: nil))
155+
if let cert {
155156
if let metadata = getCertificateMetadata(for: serialNumber) {
156157
cert.machineIdentifier = metadata["machineIdentifier"]
157158
cert.machineName = metadata["machineName"]

0 commit comments

Comments
 (0)