Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,7 @@ final class WatchConnectionManager: NSObject {
self.logger.info("WCSession이 이미 활성화되어 있습니다.")

// 이미 활성화된 경우 현재 reachable 상태를 확인하여 콜백 호출
Task { @MainActor in
self.onReachableChanged?(session.isReachable)
}
handleWatchReachability(session: session)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

handleWatchReachability을 호출하는 방법이 있었네요..

return
}

Expand Down Expand Up @@ -201,6 +199,7 @@ extension WatchConnectionManager: WCSessionDelegate {
} else {
self.logger.info("WCSession 활성화 성공")
}
handleWatchReachability(session: session)
}

nonisolated func session(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down