diff --git a/mirroringBooth/mirroringBooth/Device/Camera/Browser/WatchConnectionManager+iOS.swift b/mirroringBooth/mirroringBooth/Device/Camera/Browser/WatchConnectionManager+iOS.swift index 9ff2c4a7..217edcd8 100644 --- a/mirroringBooth/mirroringBooth/Device/Camera/Browser/WatchConnectionManager+iOS.swift +++ b/mirroringBooth/mirroringBooth/Device/Camera/Browser/WatchConnectionManager+iOS.swift @@ -69,9 +69,7 @@ final class WatchConnectionManager: NSObject { self.logger.info("WCSession이 이미 활성화되어 있습니다.") // 이미 활성화된 경우 현재 reachable 상태를 확인하여 콜백 호출 - Task { @MainActor in - self.onReachableChanged?(session.isReachable) - } + handleWatchReachability(session: session) return } @@ -201,6 +199,7 @@ extension WatchConnectionManager: WCSessionDelegate { } else { self.logger.info("WCSession 활성화 성공") } + handleWatchReachability(session: session) } nonisolated func session( diff --git a/mirroringBooth/mirroringBooth/Device/Remote/AppleWatch/WatchConnectionManger+watchOS.swift b/mirroringBooth/mirroringBooth/Device/Remote/AppleWatch/WatchConnectionManger+watchOS.swift index da5bc2a0..ad08461a 100644 --- a/mirroringBooth/mirroringBooth/Device/Remote/AppleWatch/WatchConnectionManger+watchOS.swift +++ b/mirroringBooth/mirroringBooth/Device/Remote/AppleWatch/WatchConnectionManger+watchOS.swift @@ -69,11 +69,11 @@ final class WatchConnectionManager: NSObject { session.delegate = self - // iPhone에게 Watch 앱이 active 상태임을 전달 - pushWatchAppState(.active) - if session.activationState == .activated { self.logger.info("WCSession이 이미 활성화되어 있습니다.") + + // 이미 활성화된 경우 상태 푸시 + pushWatchAppState(.active) // 이미 활성화된 경우에도 현재 상태를 확인하여 콜백 호출 let context: [String: Any] = session.receivedApplicationContext @@ -198,6 +198,9 @@ extension WatchConnectionManager: WCSessionDelegate { self.logger.error("WCSession 활성화 실패: 오류=\(error.localizedDescription)") } else { self.logger.info("WCSession 활성화 성공") + Task { @MainActor in + self.pushWatchAppState(.active) + } } let context: [String: Any] = session.receivedApplicationContext