fix: crash on shared extension (#621)

* fix: crash on shared extension

* fix: global(qos: .default) to global()

* fix: removed weak self
This commit is contained in:
Rubens
2025-09-17 08:03:07 -07:00
committed by GitHub
parent 4a21ab0531
commit 221819b591
2 changed files with 5 additions and 4 deletions
@@ -35,8 +35,9 @@ final class ShareViewController: UIViewController {
statusLabel.leadingAnchor.constraint(greaterThanOrEqualTo: view.layoutMarginsGuide.leadingAnchor),
statusLabel.trailingAnchor.constraint(lessThanOrEqualTo: view.layoutMarginsGuide.trailingAnchor)
])
processShare()
DispatchQueue.global().async {
self.processShare()
}
}
// MARK: - Processing
@@ -163,7 +164,7 @@ final class ShareViewController: UIViewController {
statusLabel.text = msg
// Complete shortly after showing status
DispatchQueue.main.asyncAfter(deadline: .now() + TransportConfig.uiShareExtensionDismissDelaySeconds) {
self.extensionContext?.completeRequest(returningItems: nil, completionHandler: nil)
self.extensionContext?.completeRequest(returningItems: [], completionHandler: nil)
}
}
}