Ver Fonte

[Infra] Clean up visionOS conditionals (#12934)

Nick Cooke há 1 ano atrás
pai
commit
554255aa09
48 ficheiros alterados com 91 adições e 103 exclusões
  1. 1 1
      FirebaseCore/Sources/FIRApp.m
  2. 1 1
      FirebaseCore/Tests/Unit/FIRAppTest.m
  3. 1 2
      FirebaseDatabase/Sources/Core/FPersistentConnection.m
  4. 2 4
      FirebaseDatabase/Sources/Core/FRepo.m
  5. 1 2
      FirebaseDatabase/Sources/Persistence/FLevelDBStorageEngine.m
  6. 1 2
      FirebaseDatabase/Sources/Realtime/FWebSocketConnection.m
  7. 2 2
      FirebaseInAppMessaging/Sources/Analytics/FIRIAMAnalyticsEventLoggerImpl.m
  8. 2 2
      FirebaseInAppMessaging/Sources/Analytics/FIRIAMClearcutHttpRequestSender.m
  9. 2 2
      FirebaseInAppMessaging/Sources/Analytics/FIRIAMClearcutLogStorage.m
  10. 2 2
      FirebaseInAppMessaging/Sources/Analytics/FIRIAMClearcutLogger.m
  11. 2 2
      FirebaseInAppMessaging/Sources/Analytics/FIRIAMClearcutUploader.m
  12. 2 2
      FirebaseInAppMessaging/Sources/Data/FIRIAMFetchResponseParser.m
  13. 2 2
      FirebaseInAppMessaging/Sources/Data/FIRIAMMessageContentDataWithImageURL.m
  14. 2 2
      FirebaseInAppMessaging/Sources/Data/FIRIAMMessageDefinition.m
  15. 2 2
      FirebaseInAppMessaging/Sources/Data/FIRIAMRenderingEffectSetting.m
  16. 2 2
      FirebaseInAppMessaging/Sources/DisplayTrigger/FIRIAMDisplayTriggerDefinition.m
  17. 2 2
      FirebaseInAppMessaging/Sources/FIRCore+InAppMessaging.m
  18. 2 2
      FirebaseInAppMessaging/Sources/FIRInAppMessaging.m
  19. 2 2
      FirebaseInAppMessaging/Sources/Flows/FIRIAMActivityLogger.m
  20. 2 2
      FirebaseInAppMessaging/Sources/Flows/FIRIAMBookKeeper.m
  21. 2 2
      FirebaseInAppMessaging/Sources/Flows/FIRIAMClientInfoFetcher.m
  22. 2 2
      FirebaseInAppMessaging/Sources/Flows/FIRIAMDisplayCheckOnAnalyticEventsFlow.m
  23. 2 2
      FirebaseInAppMessaging/Sources/Flows/FIRIAMDisplayCheckOnAppForegroundFlow.m
  24. 2 2
      FirebaseInAppMessaging/Sources/Flows/FIRIAMDisplayCheckOnFetchDoneNotificationFlow.m
  25. 2 2
      FirebaseInAppMessaging/Sources/Flows/FIRIAMDisplayCheckTriggerFlow.m
  26. 2 2
      FirebaseInAppMessaging/Sources/Flows/FIRIAMDisplayExecutor.m
  27. 2 2
      FirebaseInAppMessaging/Sources/Flows/FIRIAMFetchFlow.m
  28. 2 2
      FirebaseInAppMessaging/Sources/Flows/FIRIAMFetchOnAppForegroundFlow.m
  29. 2 2
      FirebaseInAppMessaging/Sources/Flows/FIRIAMMessageClientCache.m
  30. 2 2
      FirebaseInAppMessaging/Sources/Flows/FIRIAMMsgFetcherUsingRestful.m
  31. 2 2
      FirebaseInAppMessaging/Sources/Flows/FIRIAMServerMsgFetchStorage.m
  32. 2 2
      FirebaseInAppMessaging/Sources/RenderingObjects/FIRInAppMessagingRenderingDataClasses.m
  33. 2 2
      FirebaseInAppMessaging/Sources/Runtime/FIRIAMActionURLFollower.m
  34. 2 2
      FirebaseInAppMessaging/Sources/Runtime/FIRIAMRuntimeManager.m
  35. 2 2
      FirebaseInAppMessaging/Sources/Runtime/FIRIAMSDKModeManager.m
  36. 2 2
      FirebaseInAppMessaging/Sources/Runtime/FIRIAMSDKSettings.m
  37. 2 2
      FirebaseInAppMessaging/Sources/Runtime/FIRInAppMessaging+Bootstrap.m
  38. 2 2
      FirebaseInAppMessaging/Sources/Util/FIRIAMElapsedTimeTracker.m
  39. 2 2
      FirebaseInAppMessaging/Sources/Util/FIRIAMTimeFetcher.m
  40. 2 2
      FirebaseInAppMessaging/Sources/Util/NSString+FIRInterlaceStrings.m
  41. 2 2
      FirebaseInAppMessaging/Sources/Util/UIApplication+FIRForegroundWindowScene.m
  42. 2 2
      FirebaseInAppMessaging/Sources/Util/UIColor+FIRIAMHexString.m
  43. 1 2
      FirebaseMessaging/Sources/FIRMessagingUtilities.m
  44. 1 1
      FirebaseMessaging/Sources/Token/FIRMessagingAuthKeychain.m
  45. 6 11
      Firestore/core/src/remote/connectivity_monitor_apple.mm
  46. 2 3
      Firestore/core/src/util/filesystem_apple.mm
  47. 1 1
      SwiftPM-PlatformExclude/FirebaseFirestoreWrap/dummy.m
  48. 1 1
      SwiftPM-PlatformExclude/FirebaseInAppMessagingWrap/dummy.m

+ 1 - 1
FirebaseCore/Sources/FIRApp.m

@@ -855,7 +855,7 @@ static FIRApp *sDefaultApp;
 #pragma mark - App Life Cycle
 
 - (void)subscribeForAppDidBecomeActiveNotifications {
-#if TARGET_OS_IOS || TARGET_OS_TV || (defined(TARGET_OS_VISION) && TARGET_OS_VISION)
+#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION
   NSNotificationName notificationName = UIApplicationDidBecomeActiveNotification;
 #elif TARGET_OS_OSX
   NSNotificationName notificationName = NSApplicationDidBecomeActiveNotification;

+ 1 - 1
FirebaseCore/Tests/Unit/FIRAppTest.m

@@ -862,7 +862,7 @@ NSString *const kFIRTestAppName2 = @"test-app-name-2";
 }
 
 - (NSNotificationName)appDidBecomeActiveNotificationName {
-#if TARGET_OS_IOS || TARGET_OS_TV || (defined(TARGET_OS_VISION) && TARGET_OS_VISION)
+#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION
   return UIApplicationDidBecomeActiveNotification;
 #elif TARGET_OS_OSX
   return NSApplicationDidBecomeActiveNotification;

+ 1 - 2
FirebaseDatabase/Sources/Core/FPersistentConnection.m

@@ -1256,8 +1256,7 @@ static void reachabilityCallback(SCNetworkReachabilityRef ref,
 - (void)sendConnectStats {
     NSMutableDictionary *stats = [NSMutableDictionary dictionary];
 
-#if TARGET_OS_IOS || TARGET_OS_TV ||                                           \
-    (defined(TARGET_OS_VISION) && TARGET_OS_VISION)
+#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION
     if (self.config.persistenceEnabled) {
         stats[@"persistence.ios.enabled"] = @1;
     }

+ 2 - 4
FirebaseDatabase/Sources/Core/FRepo.m

@@ -52,8 +52,7 @@
 #import "FirebaseDatabase/Sources/Utilities/Tuples/FTupleTransaction.h"
 #import <dlfcn.h>
 
-#if TARGET_OS_IOS || TARGET_OS_TV ||                                           \
-    (defined(TARGET_OS_VISION) && TARGET_OS_VISION)
+#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION
 #import <UIKit/UIKit.h>
 #endif
 
@@ -816,8 +815,7 @@
 
 // Targetted compilation is ONLY for testing. UIKit is weak-linked in actual
 // release build.
-#if TARGET_OS_IOS || TARGET_OS_TV ||                                           \
-    (defined(TARGET_OS_VISION) && TARGET_OS_VISION)
+#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION
     // The idea is to wait until any outstanding sets get written to disk. Since
     // the sets might still be in our dispatch queue, we wait for the dispatch
     // queue to catch up and for persistence to catch up. This may be

+ 1 - 2
FirebaseDatabase/Sources/Persistence/FLevelDBStorageEngine.m

@@ -275,8 +275,7 @@ static NSString *trackedQueryKeysKey(NSUInteger trackedQueryId, NSString *key) {
 }
 
 + (NSString *)firebaseDir {
-#if TARGET_OS_IOS || TARGET_OS_WATCH ||                                        \
-    (defined(TARGET_OS_VISION) && TARGET_OS_VISION)
+#if TARGET_OS_IOS || TARGET_OS_WATCH || TARGET_OS_VISION
     NSArray *dirPaths = NSSearchPathForDirectoriesInDomains(
         NSDocumentDirectory, NSUserDomainMask, YES);
     NSString *documentsDir = [dirPaths objectAtIndex:0];

+ 1 - 2
FirebaseDatabase/Sources/Realtime/FWebSocketConnection.m

@@ -164,8 +164,7 @@ static NSString *const kGoogleAppIDHeader = @"X-Firebase-GMPID";
 
 // Targetted compilation is ONLY for testing. UIKit is weak-linked in actual
 // release build.
-#if TARGET_OS_IOS || TARGET_OS_TV ||                                           \
-    (defined(TARGET_OS_VISION) && TARGET_OS_VISION)
+#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION
     Class uiDeviceClass = NSClassFromString(@"UIDevice");
     if (uiDeviceClass) {
         systemVersion = [uiDeviceClass currentDevice].systemVersion;

+ 2 - 2
FirebaseInAppMessaging/Sources/Analytics/FIRIAMAnalyticsEventLoggerImpl.m

@@ -15,7 +15,7 @@
  */
 
 #import <TargetConditionals.h>
-#if TARGET_OS_IOS || TARGET_OS_TV || (defined(TARGET_OS_VISION) && TARGET_OS_VISION)
+#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION
 
 #import <GoogleUtilities/GULUserDefaults.h>
 
@@ -176,4 +176,4 @@ static NSString *const kFIAMUserDefaualtsKeyForRemoveUserPropertyTimeInSeconds =
 }
 @end
 
-#endif  // TARGET_OS_IOS || TARGET_OS_TV || (defined(TARGET_OS_VISION) && TARGET_OS_VISION)
+#endif  // TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION

+ 2 - 2
FirebaseInAppMessaging/Sources/Analytics/FIRIAMClearcutHttpRequestSender.m

@@ -15,7 +15,7 @@
  */
 
 #import <TargetConditionals.h>
-#if TARGET_OS_IOS || TARGET_OS_TV || (defined(TARGET_OS_VISION) && TARGET_OS_VISION)
+#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION
 
 #import "FirebaseCore/Extension/FirebaseCoreInternal.h"
 
@@ -204,4 +204,4 @@
 }
 @end
 
-#endif  // TARGET_OS_IOS || TARGET_OS_TV || (defined(TARGET_OS_VISION) && TARGET_OS_VISION)
+#endif  // TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION

+ 2 - 2
FirebaseInAppMessaging/Sources/Analytics/FIRIAMClearcutLogStorage.m

@@ -15,7 +15,7 @@
  */
 
 #import <TargetConditionals.h>
-#if TARGET_OS_IOS || TARGET_OS_TV || (defined(TARGET_OS_VISION) && TARGET_OS_VISION)
+#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION
 
 #import <UIKit/UIKit.h>
 
@@ -207,4 +207,4 @@ static NSString *const kEventExtensionJson = @"extension_js";
 }
 @end
 
-#endif  // TARGET_OS_IOS || TARGET_OS_TV || (defined(TARGET_OS_VISION) && TARGET_OS_VISION)
+#endif  // TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION

+ 2 - 2
FirebaseInAppMessaging/Sources/Analytics/FIRIAMClearcutLogger.m

@@ -15,7 +15,7 @@
  */
 
 #import <TargetConditionals.h>
-#if TARGET_OS_IOS || TARGET_OS_TV || (defined(TARGET_OS_VISION) && TARGET_OS_VISION)
+#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION
 
 #import "FirebaseCore/Extension/FirebaseCoreInternal.h"
 
@@ -214,4 +214,4 @@
 }
 @end
 
-#endif  // TARGET_OS_IOS || TARGET_OS_TV || (defined(TARGET_OS_VISION) && TARGET_OS_VISION)
+#endif  // TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION

+ 2 - 2
FirebaseInAppMessaging/Sources/Analytics/FIRIAMClearcutUploader.m

@@ -15,7 +15,7 @@
  */
 
 #import <TargetConditionals.h>
-#if TARGET_OS_IOS || TARGET_OS_TV || (defined(TARGET_OS_VISION) && TARGET_OS_VISION)
+#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION
 
 #import <GoogleUtilities/GULUserDefaults.h>
 #import <UIKit/UIKit.h>
@@ -244,4 +244,4 @@ static NSString *FIRIAM_UserDefaultsKeyForNextValidClearcutUploadTimeInMills =
 
 @end
 
-#endif  // TARGET_OS_IOS || TARGET_OS_TV || (defined(TARGET_OS_VISION) && TARGET_OS_VISION)
+#endif  // TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION

+ 2 - 2
FirebaseInAppMessaging/Sources/Data/FIRIAMFetchResponseParser.m

@@ -15,7 +15,7 @@
  */
 
 #import <TargetConditionals.h>
-#if TARGET_OS_IOS || TARGET_OS_TV || (defined(TARGET_OS_VISION) && TARGET_OS_VISION)
+#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION
 
 #import "FirebaseCore/Extension/FirebaseCoreInternal.h"
 
@@ -399,4 +399,4 @@
 
 @end
 
-#endif  // TARGET_OS_IOS || TARGET_OS_TV || (defined(TARGET_OS_VISION) && TARGET_OS_VISION)
+#endif  // TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION

+ 2 - 2
FirebaseInAppMessaging/Sources/Data/FIRIAMMessageContentDataWithImageURL.m

@@ -15,7 +15,7 @@
  */
 
 #import <TargetConditionals.h>
-#if TARGET_OS_IOS || TARGET_OS_TV || (defined(TARGET_OS_VISION) && TARGET_OS_VISION)
+#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION
 
 #import "FirebaseCore/Extension/FirebaseCoreInternal.h"
 
@@ -206,4 +206,4 @@ static NSInteger const SuccessHTTPStatusCode = 200;
 
 @end
 
-#endif  // TARGET_OS_IOS || TARGET_OS_TV || (defined(TARGET_OS_VISION) && TARGET_OS_VISION)
+#endif  // TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION

+ 2 - 2
FirebaseInAppMessaging/Sources/Data/FIRIAMMessageDefinition.m

@@ -15,7 +15,7 @@
  */
 
 #import <TargetConditionals.h>
-#if TARGET_OS_IOS || TARGET_OS_TV || (defined(TARGET_OS_VISION) && TARGET_OS_VISION)
+#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION
 
 #import "FirebaseInAppMessaging/Sources/Private/Data/FIRIAMMessageDefinition.h"
 
@@ -109,4 +109,4 @@
 }
 @end
 
-#endif  // TARGET_OS_IOS || TARGET_OS_TV || (defined(TARGET_OS_VISION) && TARGET_OS_VISION)
+#endif  // TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION

+ 2 - 2
FirebaseInAppMessaging/Sources/Data/FIRIAMRenderingEffectSetting.m

@@ -15,7 +15,7 @@
  */
 
 #import <TargetConditionals.h>
-#if TARGET_OS_IOS || TARGET_OS_TV || (defined(TARGET_OS_VISION) && TARGET_OS_VISION)
+#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION
 
 #import "FirebaseInAppMessaging/Sources/Private/Data/FIRIAMRenderingEffectSetting.h"
 
@@ -34,4 +34,4 @@
 }
 @end
 
-#endif  // TARGET_OS_IOS || TARGET_OS_TV || (defined(TARGET_OS_VISION) && TARGET_OS_VISION)
+#endif  // TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION

+ 2 - 2
FirebaseInAppMessaging/Sources/DisplayTrigger/FIRIAMDisplayTriggerDefinition.m

@@ -15,7 +15,7 @@
  */
 
 #import <TargetConditionals.h>
-#if TARGET_OS_IOS || TARGET_OS_TV || (defined(TARGET_OS_VISION) && TARGET_OS_VISION)
+#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION
 
 #import "FirebaseInAppMessaging/Sources/Private/DisplayTrigger/FIRIAMDisplayTriggerDefinition.h"
 
@@ -43,4 +43,4 @@
 }
 @end
 
-#endif  // TARGET_OS_IOS || TARGET_OS_TV || (defined(TARGET_OS_VISION) && TARGET_OS_VISION)
+#endif  // TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION

+ 2 - 2
FirebaseInAppMessaging/Sources/FIRCore+InAppMessaging.m

@@ -15,7 +15,7 @@
  */
 
 #import <TargetConditionals.h>
-#if TARGET_OS_IOS || TARGET_OS_TV || (defined(TARGET_OS_VISION) && TARGET_OS_VISION)
+#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION
 
 #import <Foundation/Foundation.h>
 #import "FirebaseInAppMessaging/Sources/FIRCore+InAppMessaging.h"
@@ -23,4 +23,4 @@
 NSString *const kFirebaseInAppMessagingErrorDomain = @"com.firebase.inappmessaging";
 FIRLoggerService kFIRLoggerInAppMessaging = @"[FirebaseInAppMessaging]";
 
-#endif  // TARGET_OS_IOS || TARGET_OS_TV || (defined(TARGET_OS_VISION) && TARGET_OS_VISION)
+#endif  // TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION

+ 2 - 2
FirebaseInAppMessaging/Sources/FIRInAppMessaging.m

@@ -15,7 +15,7 @@
  */
 
 #import <TargetConditionals.h>
-#if TARGET_OS_IOS || TARGET_OS_TV || (defined(TARGET_OS_VISION) && TARGET_OS_VISION)
+#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION
 
 #import "FirebaseInAppMessaging/Sources/Public/FirebaseInAppMessaging/FIRInAppMessaging.h"
 
@@ -145,4 +145,4 @@ static BOOL _autoBootstrapOnFIRAppInit = YES;
 
 @end
 
-#endif  // TARGET_OS_IOS || TARGET_OS_TV || (defined(TARGET_OS_VISION) && TARGET_OS_VISION)
+#endif  // TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION

+ 2 - 2
FirebaseInAppMessaging/Sources/Flows/FIRIAMActivityLogger.m

@@ -15,7 +15,7 @@
  */
 
 #import <TargetConditionals.h>
-#if TARGET_OS_IOS || TARGET_OS_TV || (defined(TARGET_OS_VISION) && TARGET_OS_VISION)
+#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION
 
 #import <UIKit/UIKit.h>
 
@@ -243,4 +243,4 @@ static NSString *const kDetailArchiveKey = @"detail";
 }
 @end
 
-#endif  // TARGET_OS_IOS || TARGET_OS_TV || (defined(TARGET_OS_VISION) && TARGET_OS_VISION)
+#endif  // TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION

+ 2 - 2
FirebaseInAppMessaging/Sources/Flows/FIRIAMBookKeeper.m

@@ -15,7 +15,7 @@
  */
 
 #import <TargetConditionals.h>
-#if TARGET_OS_IOS || TARGET_OS_TV || (defined(TARGET_OS_VISION) && TARGET_OS_VISION)
+#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION
 
 #import <GoogleUtilities/GULUserDefaults.h>
 
@@ -264,4 +264,4 @@ static NSTimeInterval kMaxFetchWaitTimeInSeconds = 3 * 24 * 60 * 60;
 }
 @end
 
-#endif  // TARGET_OS_IOS || TARGET_OS_TV || (defined(TARGET_OS_VISION) && TARGET_OS_VISION)
+#endif  // TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION

+ 2 - 2
FirebaseInAppMessaging/Sources/Flows/FIRIAMClientInfoFetcher.m

@@ -15,7 +15,7 @@
  */
 
 #import <TargetConditionals.h>
-#if TARGET_OS_IOS || TARGET_OS_TV || (defined(TARGET_OS_VISION) && TARGET_OS_VISION)
+#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION
 
 #import "FirebaseCore/Extension/FirebaseCoreInternal.h"
 #import "FirebaseInstallations/Source/Library/Private/FirebaseInstallationsInternal.h"
@@ -133,4 +133,4 @@
 }
 @end
 
-#endif  // TARGET_OS_IOS || TARGET_OS_TV || (defined(TARGET_OS_VISION) && TARGET_OS_VISION)
+#endif  // TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION

+ 2 - 2
FirebaseInAppMessaging/Sources/Flows/FIRIAMDisplayCheckOnAnalyticEventsFlow.m

@@ -15,7 +15,7 @@
  */
 
 #import <TargetConditionals.h>
-#if TARGET_OS_IOS || TARGET_OS_TV || (defined(TARGET_OS_VISION) && TARGET_OS_VISION)
+#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION
 
 #import "FirebaseCore/Extension/FirebaseCoreInternal.h"
 #import "Interop/Analytics/Public/FIRAnalyticsInterop.h"
@@ -68,4 +68,4 @@
 
 @end
 
-#endif  // TARGET_OS_IOS || TARGET_OS_TV || (defined(TARGET_OS_VISION) && TARGET_OS_VISION)
+#endif  // TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION

+ 2 - 2
FirebaseInAppMessaging/Sources/Flows/FIRIAMDisplayCheckOnAppForegroundFlow.m

@@ -15,7 +15,7 @@
  */
 
 #import <TargetConditionals.h>
-#if TARGET_OS_IOS || TARGET_OS_TV || (defined(TARGET_OS_VISION) && TARGET_OS_VISION)
+#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION
 
 #import "FirebaseCore/Extension/FirebaseCoreInternal.h"
 
@@ -65,4 +65,4 @@
 }
 @end
 
-#endif  // TARGET_OS_IOS || TARGET_OS_TV || (defined(TARGET_OS_VISION) && TARGET_OS_VISION)
+#endif  // TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION

+ 2 - 2
FirebaseInAppMessaging/Sources/Flows/FIRIAMDisplayCheckOnFetchDoneNotificationFlow.m

@@ -15,7 +15,7 @@
  */
 
 #import <TargetConditionals.h>
-#if TARGET_OS_IOS || TARGET_OS_TV || (defined(TARGET_OS_VISION) && TARGET_OS_VISION)
+#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION
 
 #import "FirebaseCore/Extension/FirebaseCoreInternal.h"
 
@@ -64,4 +64,4 @@ extern NSString *const kFIRIAMFetchIsDoneNotification;
 }
 @end
 
-#endif  // TARGET_OS_IOS || TARGET_OS_TV || (defined(TARGET_OS_VISION) && TARGET_OS_VISION)
+#endif  // TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION

+ 2 - 2
FirebaseInAppMessaging/Sources/Flows/FIRIAMDisplayCheckTriggerFlow.m

@@ -15,7 +15,7 @@
  */
 
 #import <TargetConditionals.h>
-#if TARGET_OS_IOS || TARGET_OS_TV || (defined(TARGET_OS_VISION) && TARGET_OS_VISION)
+#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION
 
 #import "FirebaseInAppMessaging/Sources/Private/Flows/FIRIAMDisplayCheckTriggerFlow.h"
 
@@ -34,4 +34,4 @@
 }
 @end
 
-#endif  // TARGET_OS_IOS || TARGET_OS_TV || (defined(TARGET_OS_VISION) && TARGET_OS_VISION)
+#endif  // TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION

+ 2 - 2
FirebaseInAppMessaging/Sources/Flows/FIRIAMDisplayExecutor.m

@@ -15,7 +15,7 @@
  */
 
 #import <TargetConditionals.h>
-#if TARGET_OS_IOS || TARGET_OS_TV || (defined(TARGET_OS_VISION) && TARGET_OS_VISION)
+#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION
 
 #import <UIKit/UIKit.h>
 #import "FirebaseCore/Extension/FirebaseCoreInternal.h"
@@ -776,4 +776,4 @@
 }
 @end
 
-#endif  // TARGET_OS_IOS || TARGET_OS_TV || (defined(TARGET_OS_VISION) && TARGET_OS_VISION)
+#endif  // TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION

+ 2 - 2
FirebaseInAppMessaging/Sources/Flows/FIRIAMFetchFlow.m

@@ -15,7 +15,7 @@
  */
 
 #import <TargetConditionals.h>
-#if TARGET_OS_IOS || TARGET_OS_TV || (defined(TARGET_OS_VISION) && TARGET_OS_VISION)
+#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION
 
 #import "FirebaseCore/Extension/FirebaseCoreInternal.h"
 
@@ -267,4 +267,4 @@ NSString *const kFIRIAMFetchIsDoneNotification = @"FIRIAMFetchIsDoneNotification
 }
 @end
 
-#endif  // TARGET_OS_IOS || TARGET_OS_TV || (defined(TARGET_OS_VISION) && TARGET_OS_VISION)
+#endif  // TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION

+ 2 - 2
FirebaseInAppMessaging/Sources/Flows/FIRIAMFetchOnAppForegroundFlow.m

@@ -15,7 +15,7 @@
  */
 
 #import <TargetConditionals.h>
-#if TARGET_OS_IOS || TARGET_OS_TV || (defined(TARGET_OS_VISION) && TARGET_OS_VISION)
+#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION
 
 #import "FirebaseCore/Extension/FirebaseCoreInternal.h"
 
@@ -59,4 +59,4 @@
 }
 @end
 
-#endif  // TARGET_OS_IOS || TARGET_OS_TV || (defined(TARGET_OS_VISION) && TARGET_OS_VISION)
+#endif  // TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION

+ 2 - 2
FirebaseInAppMessaging/Sources/Flows/FIRIAMMessageClientCache.m

@@ -15,7 +15,7 @@
  */
 
 #import <TargetConditionals.h>
-#if TARGET_OS_IOS || TARGET_OS_TV || (defined(TARGET_OS_VISION) && TARGET_OS_VISION)
+#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION
 
 #import "FirebaseCore/Extension/FirebaseCoreInternal.h"
 
@@ -238,4 +238,4 @@
 }
 @end
 
-#endif  // TARGET_OS_IOS || TARGET_OS_TV || (defined(TARGET_OS_VISION) && TARGET_OS_VISION)
+#endif  // TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION

+ 2 - 2
FirebaseInAppMessaging/Sources/Flows/FIRIAMMsgFetcherUsingRestful.m

@@ -15,7 +15,7 @@
  */
 
 #import <TargetConditionals.h>
-#if TARGET_OS_IOS || TARGET_OS_TV || (defined(TARGET_OS_VISION) && TARGET_OS_VISION)
+#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION
 
 #import "FirebaseCore/Extension/FirebaseCoreInternal.h"
 
@@ -277,4 +277,4 @@ static NSInteger const SuccessHTTPStatusCode = 200;
 }
 @end
 
-#endif  // TARGET_OS_IOS || TARGET_OS_TV || (defined(TARGET_OS_VISION) && TARGET_OS_VISION)
+#endif  // TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION

+ 2 - 2
FirebaseInAppMessaging/Sources/Flows/FIRIAMServerMsgFetchStorage.m

@@ -15,7 +15,7 @@
  */
 
 #import <TargetConditionals.h>
-#if TARGET_OS_IOS || TARGET_OS_TV || (defined(TARGET_OS_VISION) && TARGET_OS_VISION)
+#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION
 
 #import "FirebaseCore/Extension/FirebaseCoreInternal.h"
 
@@ -66,4 +66,4 @@
 }
 @end
 
-#endif  // TARGET_OS_IOS || TARGET_OS_TV || (defined(TARGET_OS_VISION) && TARGET_OS_VISION)
+#endif  // TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION

+ 2 - 2
FirebaseInAppMessaging/Sources/RenderingObjects/FIRInAppMessagingRenderingDataClasses.m

@@ -15,7 +15,7 @@
  */
 
 #import <TargetConditionals.h>
-#if TARGET_OS_IOS || TARGET_OS_TV || (defined(TARGET_OS_VISION) && TARGET_OS_VISION)
+#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION
 
 #import <Foundation/Foundation.h>
 
@@ -371,4 +371,4 @@ NSString *const FIRIAMTestMessageID = @"test_message_id";
 
 @end
 
-#endif  // TARGET_OS_IOS || TARGET_OS_TV || (defined(TARGET_OS_VISION) && TARGET_OS_VISION)
+#endif  // TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION

+ 2 - 2
FirebaseInAppMessaging/Sources/Runtime/FIRIAMActionURLFollower.m

@@ -15,7 +15,7 @@
  */
 
 #import <TargetConditionals.h>
-#if TARGET_OS_IOS || TARGET_OS_TV || (defined(TARGET_OS_VISION) && TARGET_OS_VISION)
+#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION
 
 #import <Foundation/Foundation.h>
 #import <UIKit/UIKit.h>
@@ -227,4 +227,4 @@ NS_EXTENSION_UNAVAILABLE("Firebase In App Messaging is not supported for iOS ext
 }
 @end
 
-#endif  // TARGET_OS_IOS || TARGET_OS_TV || (defined(TARGET_OS_VISION) && TARGET_OS_VISION)
+#endif  // TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION

+ 2 - 2
FirebaseInAppMessaging/Sources/Runtime/FIRIAMRuntimeManager.m

@@ -15,7 +15,7 @@
  */
 
 #import <TargetConditionals.h>
-#if TARGET_OS_IOS || TARGET_OS_TV || (defined(TARGET_OS_VISION) && TARGET_OS_VISION)
+#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION
 
 #import <GoogleUtilities/GULUserDefaults.h>
 
@@ -446,4 +446,4 @@ static NSString *const kFirebaseInAppMessagingAutoDataCollectionKey =
 }
 @end
 
-#endif  // TARGET_OS_IOS || TARGET_OS_TV || (defined(TARGET_OS_VISION) && TARGET_OS_VISION)
+#endif  // TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION

+ 2 - 2
FirebaseInAppMessaging/Sources/Runtime/FIRIAMSDKModeManager.m

@@ -15,7 +15,7 @@
  */
 
 #import <TargetConditionals.h>
-#if TARGET_OS_IOS || TARGET_OS_TV || (defined(TARGET_OS_VISION) && TARGET_OS_VISION)
+#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION
 
 #import <GoogleUtilities/GULUserDefaults.h>
 
@@ -117,4 +117,4 @@ NSInteger const kFIRIAMMaxFetchInNewlyInstalledMode = 5;
 }
 @end
 
-#endif  // TARGET_OS_IOS || TARGET_OS_TV || (defined(TARGET_OS_VISION) && TARGET_OS_VISION)
+#endif  // TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION

+ 2 - 2
FirebaseInAppMessaging/Sources/Runtime/FIRIAMSDKSettings.m

@@ -15,7 +15,7 @@
  */
 
 #import <TargetConditionals.h>
-#if TARGET_OS_IOS || TARGET_OS_TV || (defined(TARGET_OS_VISION) && TARGET_OS_VISION)
+#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION
 
 #import "FirebaseInAppMessaging/Sources/Private/Runtime/FIRIAMSDKSettings.h"
 
@@ -37,4 +37,4 @@
 }
 @end
 
-#endif  // TARGET_OS_IOS || TARGET_OS_TV || (defined(TARGET_OS_VISION) && TARGET_OS_VISION)
+#endif  // TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION

+ 2 - 2
FirebaseInAppMessaging/Sources/Runtime/FIRInAppMessaging+Bootstrap.m

@@ -15,7 +15,7 @@
  */
 
 #import <TargetConditionals.h>
-#if TARGET_OS_IOS || TARGET_OS_TV || (defined(TARGET_OS_VISION) && TARGET_OS_VISION)
+#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION
 
 #import "FirebaseInAppMessaging/Sources/Private/Runtime/FIRInAppMessaging+Bootstrap.h"
 
@@ -136,4 +136,4 @@ static NSString *_fiamServerHostName = @"firebaseinappmessaging.googleapis.com";
 
 @end
 
-#endif  // TARGET_OS_IOS || TARGET_OS_TV || (defined(TARGET_OS_VISION) && TARGET_OS_VISION)
+#endif  // TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION

+ 2 - 2
FirebaseInAppMessaging/Sources/Util/FIRIAMElapsedTimeTracker.m

@@ -15,7 +15,7 @@
  */
 
 #import <TargetConditionals.h>
-#if TARGET_OS_IOS || TARGET_OS_TV || (defined(TARGET_OS_VISION) && TARGET_OS_VISION)
+#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION
 
 #import "FirebaseInAppMessaging/Sources/Util/FIRIAMElapsedTimeTracker.h"
 @interface FIRIAMElapsedTimeTracker ()
@@ -58,4 +58,4 @@
 }
 @end
 
-#endif  // TARGET_OS_IOS || TARGET_OS_TV || (defined(TARGET_OS_VISION) && TARGET_OS_VISION)
+#endif  // TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION

+ 2 - 2
FirebaseInAppMessaging/Sources/Util/FIRIAMTimeFetcher.m

@@ -15,7 +15,7 @@
  */
 
 #import <TargetConditionals.h>
-#if TARGET_OS_IOS || TARGET_OS_TV || (defined(TARGET_OS_VISION) && TARGET_OS_VISION)
+#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION
 
 #import "FirebaseInAppMessaging/Sources/Private/Util/FIRIAMTimeFetcher.h"
 
@@ -25,4 +25,4 @@
 }
 @end
 
-#endif  // TARGET_OS_IOS || TARGET_OS_TV || (defined(TARGET_OS_VISION) && TARGET_OS_VISION)
+#endif  // TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION

+ 2 - 2
FirebaseInAppMessaging/Sources/Util/NSString+FIRInterlaceStrings.m

@@ -15,7 +15,7 @@
  */
 
 #import <TargetConditionals.h>
-#if TARGET_OS_IOS || TARGET_OS_TV || (defined(TARGET_OS_VISION) && TARGET_OS_VISION)
+#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION
 
 #import "FirebaseInAppMessaging/Sources/Private/Util/NSString+FIRInterlaceStrings.h"
 
@@ -44,4 +44,4 @@
 
 @end
 
-#endif  // TARGET_OS_IOS || TARGET_OS_TV || (defined(TARGET_OS_VISION) && TARGET_OS_VISION)
+#endif  // TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION

+ 2 - 2
FirebaseInAppMessaging/Sources/Util/UIApplication+FIRForegroundWindowScene.m

@@ -15,7 +15,7 @@
  */
 
 #import <TargetConditionals.h>
-#if TARGET_OS_IOS || TARGET_OS_TV || (defined(TARGET_OS_VISION) && TARGET_OS_VISION)
+#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION
 
 #import "FirebaseInAppMessaging/Sources/Private/Util/UIApplication+FIRForegroundWindowScene.h"
 
@@ -37,4 +37,4 @@
 
 @end
 
-#endif  // TARGET_OS_IOS || TARGET_OS_TV || (defined(TARGET_OS_VISION) && TARGET_OS_VISION)
+#endif  // TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION

+ 2 - 2
FirebaseInAppMessaging/Sources/Util/UIColor+FIRIAMHexString.m

@@ -15,7 +15,7 @@
  */
 
 #import <TargetConditionals.h>
-#if TARGET_OS_IOS || TARGET_OS_TV || (defined(TARGET_OS_VISION) && TARGET_OS_VISION)
+#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION
 
 #import "FirebaseInAppMessaging/Sources/Util/UIColor+FIRIAMHexString.h"
 
@@ -41,4 +41,4 @@
 }
 @end
 
-#endif  // TARGET_OS_IOS || TARGET_OS_TV || (defined(TARGET_OS_VISION) && TARGET_OS_VISION)
+#endif  // TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION

+ 1 - 2
FirebaseMessaging/Sources/FIRMessagingUtilities.m

@@ -311,8 +311,7 @@ BOOL FIRMessagingIsProductionApp(void) {
 #if TARGET_OS_OSX || TARGET_OS_MACCATALYST
   NSString *path = [[[[NSBundle mainBundle] resourcePath] stringByDeletingLastPathComponent]
       stringByAppendingPathComponent:@"embedded.provisionprofile"];
-#elif TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_WATCH || \
-    (defined(TARGET_OS_VISION) && TARGET_OS_VISION)
+#elif TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_WATCH || TARGET_OS_VISION
   NSString *path = [[[NSBundle mainBundle] bundlePath]
       stringByAppendingPathComponent:@"embedded.mobileprovision"];
 #endif

+ 1 - 1
FirebaseMessaging/Sources/Token/FIRMessagingAuthKeychain.m

@@ -92,7 +92,7 @@ NSString *const kFIRMessagingKeychainWildcardIdentifier = @"*";
   NSMutableDictionary *keychainQuery = [self keychainQueryForService:service account:account];
   NSMutableArray<NSData *> *results;
   keychainQuery[(__bridge id)kSecReturnData] = (__bridge id)kCFBooleanTrue;
-#if TARGET_OS_IOS || TARGET_OS_TV || (defined(TARGET_OS_VISION) && TARGET_OS_VISION)
+#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION
   keychainQuery[(__bridge id)kSecReturnAttributes] = (__bridge id)kCFBooleanTrue;
   keychainQuery[(__bridge id)kSecMatchLimit] = (__bridge id)kSecMatchLimitAll;
   // FIRMessagingKeychain should only take a query and return a result, will handle the query here.

+ 6 - 11
Firestore/core/src/remote/connectivity_monitor_apple.mm

@@ -18,8 +18,7 @@
 
 #if defined(__APPLE__)
 
-#if TARGET_OS_IOS || TARGET_OS_TV || \
-    (defined(TARGET_OS_VISION) && TARGET_OS_VISION)
+#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION
 #import <UIKit/UIKit.h>
 #endif
 
@@ -50,7 +49,7 @@ NetworkStatus ToNetworkStatus(SCNetworkReachabilityFlags flags) {
     return NetworkStatus::Unavailable;
   }
 
-#if TARGET_OS_IPHONE || (defined(TARGET_OS_VISION) && TARGET_OS_VISION)
+#if TARGET_OS_IPHONE || TARGET_OS_VISION
   if (flags & kSCNetworkReachabilityFlagsIsWWAN) {
     return NetworkStatus::AvailableViaCellular;
   }
@@ -113,8 +112,7 @@ class ConnectivityMonitorApple : public ConnectivityMonitor {
       return;
     }
 
-#if TARGET_OS_IOS || TARGET_OS_TV || \
-    (defined(TARGET_OS_VISION) && TARGET_OS_VISION)
+#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION
     this->observer_ = [[NSNotificationCenter defaultCenter]
         addObserverForName:UIApplicationWillEnterForegroundNotification
                     object:nil
@@ -126,8 +124,7 @@ class ConnectivityMonitorApple : public ConnectivityMonitor {
   }
 
   ~ConnectivityMonitorApple() {
-#if TARGET_OS_IOS || TARGET_OS_TV || \
-    (defined(TARGET_OS_VISION) && TARGET_OS_VISION)
+#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION
     [[NSNotificationCenter defaultCenter] removeObserver:this->observer_];
 #endif
 
@@ -142,8 +139,7 @@ class ConnectivityMonitorApple : public ConnectivityMonitor {
     }
   }
 
-#if TARGET_OS_IOS || TARGET_OS_TV || \
-    (defined(TARGET_OS_VISION) && TARGET_OS_VISION)
+#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION
   void OnEnteredForeground() {
     SCNetworkReachabilityFlags flags{};
     if (!SCNetworkReachabilityGetFlags(reachability_, &flags)) return;
@@ -171,8 +167,7 @@ class ConnectivityMonitorApple : public ConnectivityMonitor {
 
  private:
   SCNetworkReachabilityRef reachability_ = nil;
-#if TARGET_OS_IOS || TARGET_OS_TV || \
-    (defined(TARGET_OS_VISION) && TARGET_OS_VISION)
+#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION
   id<NSObject> observer_ = nil;
 #endif
 };

+ 2 - 3
Firestore/core/src/util/filesystem_apple.mm

@@ -45,8 +45,7 @@ Status Filesystem::ExcludeFromBackups(const Path& dir) {
 }
 
 StatusOr<Path> Filesystem::AppDataDir(absl::string_view app_name) {
-#if TARGET_OS_IOS || TARGET_OS_OSX || \
-    (defined(TARGET_OS_VISION) && TARGET_OS_VISION)
+#if TARGET_OS_IOS || TARGET_OS_OSX || TARGET_OS_VISION
   NSArray<NSString*>* directories = NSSearchPathForDirectoriesInDomains(
       NSApplicationSupportDirectory, NSUserDomainMask, YES);
   return Path::FromNSString(directories[0]).AppendUtf8(app_name);
@@ -62,7 +61,7 @@ StatusOr<Path> Filesystem::AppDataDir(absl::string_view app_name) {
 }
 
 StatusOr<Path> Filesystem::LegacyDocumentsDir(absl::string_view app_name) {
-#if TARGET_OS_IOS || (defined(TARGET_OS_VISION) && TARGET_OS_VISION)
+#if TARGET_OS_IOS || TARGET_OS_VISION
   NSArray<NSString*>* directories = NSSearchPathForDirectoriesInDomains(
       NSDocumentDirectory, NSUserDomainMask, YES);
   return Path::FromNSString(directories[0]).AppendUtf8(app_name);

+ 1 - 1
SwiftPM-PlatformExclude/FirebaseFirestoreWrap/dummy.m

@@ -17,7 +17,7 @@
 #warning "Firebase Firestore does not support watchOS"
 #endif
 
-#if (defined(TARGET_OS_VISION) && TARGET_OS_VISION) && FIREBASE_BINARY_FIRESTORE
+#if TARGET_OS_VISION && FIREBASE_BINARY_FIRESTORE
 #error "Firebase Firestore's binary SPM distribution does not support \
 visionOS. To enable the source distribution, quit Xcode and open the desired \
 project from the command line with the FIREBASE_SOURCE_FIRESTORE environment \

+ 1 - 1
SwiftPM-PlatformExclude/FirebaseInAppMessagingWrap/dummy.m

@@ -13,6 +13,6 @@
 // limitations under the License.
 
 #import <TargetConditionals.h>
-#if !(TARGET_OS_IOS || TARGET_OS_TV || (defined(TARGET_OS_VISION) && TARGET_OS_VISION))
+#if !(TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION)
 #warning "Firebase In App Messaging only supports the iOS, tvOS and visionOS platforms."
 #endif