Skip to content

Commit 554255a

Browse files
authored
[Infra] Clean up visionOS conditionals (#12934)
1 parent 38aabb1 commit 554255a

File tree

48 files changed

+91
-103
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+91
-103
lines changed

FirebaseCore/Sources/FIRApp.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -855,7 +855,7 @@ + (void)registerSwiftComponents {
855855
#pragma mark - App Life Cycle
856856

857857
- (void)subscribeForAppDidBecomeActiveNotifications {
858-
#if TARGET_OS_IOS || TARGET_OS_TV || (defined(TARGET_OS_VISION) && TARGET_OS_VISION)
858+
#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION
859859
NSNotificationName notificationName = UIApplicationDidBecomeActiveNotification;
860860
#elif TARGET_OS_OSX
861861
NSNotificationName notificationName = NSApplicationDidBecomeActiveNotification;

FirebaseCore/Tests/Unit/FIRAppTest.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -862,7 +862,7 @@ - (XCTestExpectation *)expectNotificationNamed:(NSNotificationName)name
862862
}
863863

864864
- (NSNotificationName)appDidBecomeActiveNotificationName {
865-
#if TARGET_OS_IOS || TARGET_OS_TV || (defined(TARGET_OS_VISION) && TARGET_OS_VISION)
865+
#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION
866866
return UIApplicationDidBecomeActiveNotification;
867867
#elif TARGET_OS_OSX
868868
return NSApplicationDidBecomeActiveNotification;

FirebaseDatabase/Sources/Core/FPersistentConnection.m

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1256,8 +1256,7 @@ - (void)sendStats:(NSDictionary *)stats {
12561256
- (void)sendConnectStats {
12571257
NSMutableDictionary *stats = [NSMutableDictionary dictionary];
12581258

1259-
#if TARGET_OS_IOS || TARGET_OS_TV || \
1260-
(defined(TARGET_OS_VISION) && TARGET_OS_VISION)
1259+
#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION
12611260
if (self.config.persistenceEnabled) {
12621261
stats[@"persistence.ios.enabled"] = @1;
12631262
}

FirebaseDatabase/Sources/Core/FRepo.m

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,7 @@
5252
#import "FirebaseDatabase/Sources/Utilities/Tuples/FTupleTransaction.h"
5353
#import <dlfcn.h>
5454

55-
#if TARGET_OS_IOS || TARGET_OS_TV || \
56-
(defined(TARGET_OS_VISION) && TARGET_OS_VISION)
55+
#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION
5756
#import <UIKit/UIKit.h>
5857
#endif
5958

@@ -816,8 +815,7 @@ - (void)didEnterBackground {
816815

817816
// Targetted compilation is ONLY for testing. UIKit is weak-linked in actual
818817
// release build.
819-
#if TARGET_OS_IOS || TARGET_OS_TV || \
820-
(defined(TARGET_OS_VISION) && TARGET_OS_VISION)
818+
#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION
821819
// The idea is to wait until any outstanding sets get written to disk. Since
822820
// the sets might still be in our dispatch queue, we wait for the dispatch
823821
// queue to catch up and for persistence to catch up. This may be

FirebaseDatabase/Sources/Persistence/FLevelDBStorageEngine.m

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,8 +275,7 @@ - (void)close {
275275
}
276276

277277
+ (NSString *)firebaseDir {
278-
#if TARGET_OS_IOS || TARGET_OS_WATCH || \
279-
(defined(TARGET_OS_VISION) && TARGET_OS_VISION)
278+
#if TARGET_OS_IOS || TARGET_OS_WATCH || TARGET_OS_VISION
280279
NSArray *dirPaths = NSSearchPathForDirectoriesInDomains(
281280
NSDocumentDirectory, NSUserDomainMask, YES);
282281
NSString *documentsDir = [dirPaths objectAtIndex:0];

FirebaseDatabase/Sources/Realtime/FWebSocketConnection.m

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,7 @@ - (NSString *)userAgent {
164164

165165
// Targetted compilation is ONLY for testing. UIKit is weak-linked in actual
166166
// release build.
167-
#if TARGET_OS_IOS || TARGET_OS_TV || \
168-
(defined(TARGET_OS_VISION) && TARGET_OS_VISION)
167+
#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION
169168
Class uiDeviceClass = NSClassFromString(@"UIDevice");
170169
if (uiDeviceClass) {
171170
systemVersion = [uiDeviceClass currentDevice].systemVersion;

FirebaseInAppMessaging/Sources/Analytics/FIRIAMAnalyticsEventLoggerImpl.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616

1717
#import <TargetConditionals.h>
18-
#if TARGET_OS_IOS || TARGET_OS_TV || (defined(TARGET_OS_VISION) && TARGET_OS_VISION)
18+
#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION
1919

2020
#import <GoogleUtilities/GULUserDefaults.h>
2121

@@ -176,4 +176,4 @@ - (void)logAnalyticsEventForType:(FIRIAMAnalyticsLogEventType)eventType
176176
}
177177
@end
178178

179-
#endif // TARGET_OS_IOS || TARGET_OS_TV || (defined(TARGET_OS_VISION) && TARGET_OS_VISION)
179+
#endif // TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION

FirebaseInAppMessaging/Sources/Analytics/FIRIAMClearcutHttpRequestSender.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616

1717
#import <TargetConditionals.h>
18-
#if TARGET_OS_IOS || TARGET_OS_TV || (defined(TARGET_OS_VISION) && TARGET_OS_VISION)
18+
#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION
1919

2020
#import "FirebaseCore/Extension/FirebaseCoreInternal.h"
2121

@@ -204,4 +204,4 @@ - (void)sendClearcutHttpRequestForLogs:(NSArray<FIRIAMClearcutLogRecord *> *)log
204204
}
205205
@end
206206

207-
#endif // TARGET_OS_IOS || TARGET_OS_TV || (defined(TARGET_OS_VISION) && TARGET_OS_VISION)
207+
#endif // TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION

FirebaseInAppMessaging/Sources/Analytics/FIRIAMClearcutLogStorage.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616

1717
#import <TargetConditionals.h>
18-
#if TARGET_OS_IOS || TARGET_OS_TV || (defined(TARGET_OS_VISION) && TARGET_OS_VISION)
18+
#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION
1919

2020
#import <UIKit/UIKit.h>
2121

@@ -207,4 +207,4 @@ - (BOOL)saveIntoCacheWithPath:(NSString *)cacheFilePath {
207207
}
208208
@end
209209

210-
#endif // TARGET_OS_IOS || TARGET_OS_TV || (defined(TARGET_OS_VISION) && TARGET_OS_VISION)
210+
#endif // TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION

FirebaseInAppMessaging/Sources/Analytics/FIRIAMClearcutLogger.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616

1717
#import <TargetConditionals.h>
18-
#if TARGET_OS_IOS || TARGET_OS_TV || (defined(TARGET_OS_VISION) && TARGET_OS_VISION)
18+
#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION
1919

2020
#import "FirebaseCore/Extension/FirebaseCoreInternal.h"
2121

@@ -214,4 +214,4 @@ - (void)logAnalyticsEventForType:(FIRIAMAnalyticsLogEventType)eventType
214214
}
215215
@end
216216

217-
#endif // TARGET_OS_IOS || TARGET_OS_TV || (defined(TARGET_OS_VISION) && TARGET_OS_VISION)
217+
#endif // TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION

0 commit comments

Comments
 (0)