Fix: iOS share extension not detecting new devices after a while

This commit is contained in:
Leon Böttger committed 2025-11-22 16:08:11 +01:00
1 parent 734cf766d5
commit fdc19b6f62
4 files changed
+19 -17

No files matched your search

+9 -2
View File
@@ -15,7 +15,7 @@ class ShareViewController: UIViewController {
loadAttachments(with: extensionContext, loadedItems: { [self] result in
log("ShareViewController: Loaded attachments: \(result)")
log("[ShareViewController] Loaded attachments: \(result)")
var attachmentDetails = result
attachmentDetails.closeView = { [weak self] in
@@ -48,5 +48,12 @@ class ShareViewController: UIViewController {
hostingController.didMove(toParent: self)
}
override func viewDidDisappear(_ animated: Bool) {
NearbyConnectionManager.shared.stopDeviceDiscovery()
super.viewDidDisappear(animated)
log("[ShareViewController] Disappeared view.")
}
}