From ea4807b175f665d59acf80c1be3c86ad24814022 Mon Sep 17 00:00:00 2001 From: Jungseok Oh Date: Mon, 9 Jun 2025 17:24:33 +0900 Subject: [PATCH] Fix network status check property --- Config/DeviceConfig.swift | 5 +++-- .../Resources/LaunchScreen/SplashViewController.swift | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Config/DeviceConfig.swift b/Config/DeviceConfig.swift index 36dd76df..0552df51 100644 --- a/Config/DeviceConfig.swift +++ b/Config/DeviceConfig.swift @@ -11,14 +11,15 @@ import SystemConfiguration class DeviceManager { static let shared: DeviceManager = DeviceManager() - var networkStatue: Bool { + /// Current network reachability status + var networkStatus: Bool { return checkDeviceNetworkStatus() } private init() {} private func checkDeviceNetworkStatus() -> Bool { - print("Check to Device Natwork Status....") + print("Check Device Network Status....") var zeroAddress = sockaddr_in(sin_len: 0, sin_family: 0, sin_port: 0, sin_addr: in_addr(s_addr: 0), sin_zero: (0, 0, 0, 0, 0, 0, 0, 0)) zeroAddress.sin_len = UInt8(MemoryLayout.size(ofValue: zeroAddress)) zeroAddress.sin_family = sa_family_t(AF_INET) diff --git a/Where_Are_You/Resources/LaunchScreen/SplashViewController.swift b/Where_Are_You/Resources/LaunchScreen/SplashViewController.swift index c25f138a..666a0ebe 100644 --- a/Where_Are_You/Resources/LaunchScreen/SplashViewController.swift +++ b/Where_Are_You/Resources/LaunchScreen/SplashViewController.swift @@ -46,7 +46,7 @@ class SplashViewController: UIViewController { } func checkDeviceNetworkStatus() { - if !(DeviceManager.shared.networkStatue) { + if !(DeviceManager.shared.networkStatus) { DispatchQueue.main.async { let networkAlert = NetworkAlert(action: { self.checkDeviceNetworkStatus()