From 5cb8976e75f4dec55270ac1a7faa9de5e1967c72 Mon Sep 17 00:00:00 2001 From: Andrew Heard Date: Wed, 11 Oct 2023 16:34:20 -0400 Subject: [PATCH] Fix `GULReachabilityCheckerTest` on visionOS --- GoogleUtilities/Reachability/GULReachabilityChecker.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/GoogleUtilities/Reachability/GULReachabilityChecker.m b/GoogleUtilities/Reachability/GULReachabilityChecker.m index f0d12351..929fd99c 100644 --- a/GoogleUtilities/Reachability/GULReachabilityChecker.m +++ b/GoogleUtilities/Reachability/GULReachabilityChecker.m @@ -180,7 +180,7 @@ - (GULReachabilityStatus)statusForFlags:(SCNetworkReachabilityFlags)flags { // Reachable flag is set. Check further flags. if (!(flags & kSCNetworkReachabilityFlagsConnectionRequired)) { // Connection required flag is not set, so we have connectivity. -#if TARGET_OS_IOS || TARGET_OS_TV +#if TARGET_OS_IOS || TARGET_OS_TV || (defined(TARGET_OS_VISION) && TARGET_OS_VISION) status = (flags & kSCNetworkReachabilityFlagsIsWWAN) ? kGULReachabilityViaCellular : kGULReachabilityViaWifi; #elif TARGET_OS_OSX @@ -191,7 +191,7 @@ - (GULReachabilityStatus)statusForFlags:(SCNetworkReachabilityFlags)flags { !(flags & kSCNetworkReachabilityFlagsInterventionRequired)) { // If the connection on demand or connection on traffic flag is set, and user intervention // is not required, we have connectivity. -#if TARGET_OS_IOS || TARGET_OS_TV +#if TARGET_OS_IOS || TARGET_OS_TV || (defined(TARGET_OS_VISION) && TARGET_OS_VISION) status = (flags & kSCNetworkReachabilityFlagsIsWWAN) ? kGULReachabilityViaCellular : kGULReachabilityViaWifi; #elif TARGET_OS_OSX