From 368a2afad4180c93fecf0100fc704533f0e81e24 Mon Sep 17 00:00:00 2001 From: mahee96 <47920326+mahee96@users.noreply.github.com> Date: Mon, 2 Mar 2026 04:54:40 +0530 Subject: [PATCH] bug-fix: ensure main thread when using UIApplication.shared --- AltStore/Operations/SendAppOperation.swift | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/AltStore/Operations/SendAppOperation.swift b/AltStore/Operations/SendAppOperation.swift index a7bcdf28..a1c6e97d 100644 --- a/AltStore/Operations/SendAppOperation.swift +++ b/AltStore/Operations/SendAppOperation.swift @@ -45,11 +45,13 @@ final class SendAppOperation: ResultOperation<()> print("AFC App `fileURL`: \(fileURL.absoluteString)") // Wait for Shortcut to Finish Before Proceeding - UIApplication.shared.open(shortcutURLoff, options: [:]) { _ in - print("Shortcut finished execution. Proceeding with file transfer.") + DispatchQueue.main.async { + UIApplication.shared.open(shortcutURLoff, options: [:]) { _ in + print("Shortcut finished execution. Proceeding with file transfer.") - DispatchQueue.global().async { - self.processFile(at: fileURL, for: app.bundleIdentifier) + DispatchQueue.global().async { + self.processFile(at: fileURL, for: app.bundleIdentifier) + } } } }