diff --git a/NearbyShare/Connection/NearbyConnectionManager.swift b/NearbyShare/Connection/NearbyConnectionManager.swift index 8416ff3..5bd75a1 100644 --- a/NearbyShare/Connection/NearbyConnectionManager.swift +++ b/NearbyShare/Connection/NearbyConnectionManager.swift @@ -118,6 +118,11 @@ public class NearbyConnectionManager: NSObject, NetServiceDelegate, InboundNearb } + deinit { + self.stopAccessingSaveDirectory() + } + + public func becomeVisible() { if startedAdvertising { log("[NearbyConnectionManager] Already advertising, skipping") @@ -231,11 +236,6 @@ public class NearbyConnectionManager: NSObject, NetServiceDelegate, InboundNearb func connectionWasTerminated(connection: InboundNearbyConnection, savedFiles: [URL], error: Error?) { incomingConnections.removeValue(forKey: connection.id) - // If there are no more incoming connections, we can stop accessing the save directory - if incomingConnections.isEmpty { - self.stopAccessingSaveDirectory() - } - if !connection.wasUserRejected { inboundAppDelegates.forEach { delegate in delegate.connectionWasTerminated(connectionID: connection.id, from: connection.remoteDeviceInfo ?? RemoteDeviceInfo(name: "UnknownDevice".localized(), type: .unknown), savedFiles: savedFiles, wasPlainTextTransfer: connection.isPlainTextTransfer, error: error) diff --git a/QuickDrop.xcodeproj/project.pbxproj b/QuickDrop.xcodeproj/project.pbxproj index 8b03f59..5d8e29e 100644 --- a/QuickDrop.xcodeproj/project.pbxproj +++ b/QuickDrop.xcodeproj/project.pbxproj @@ -1321,8 +1321,8 @@ MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = macosx; - SHARED_BUILD = 91; - SHARED_VERSION = 2.7.1; + SHARED_BUILD = 92; + SHARED_VERSION = 2.7.2; STRING_CATALOG_GENERATE_SYMBOLS = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_EMIT_LOC_STRINGS = YES; @@ -1384,8 +1384,8 @@ MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; SDKROOT = macosx; - SHARED_BUILD = 91; - SHARED_VERSION = 2.7.1; + SHARED_BUILD = 92; + SHARED_VERSION = 2.7.2; STRING_CATALOG_GENERATE_SYMBOLS = YES; SWIFT_COMPILATION_MODE = wholemodule; SWIFT_EMIT_LOC_STRINGS = YES; diff --git a/QuickDrop.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/QuickDrop.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 57d5dd3..c5ac072 100644 --- a/QuickDrop.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/QuickDrop.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -52,7 +52,7 @@ "location" : "https://github.com/leonboe1/LUI.git", "state" : { "branch" : "main", - "revision" : "a005a2241d55fe42cf7e5f6e2bcd7d4714fc8c21" + "revision" : "1490442fc11be90a3418355b81db783abeb9a6c2" } }, { @@ -124,7 +124,7 @@ "location" : "https://github.com/siteline/swiftui-introspect", "state" : { "branch" : "main", - "revision" : "11d9782bea80656e8a65a643d6ac6396e4a8662e" + "revision" : "b10fc8a284abb9bd908d77243d2ba3b3d8ea6ebc" } } ],