From 45105d0ff52ab9eefd5d5252d04d4a34745912b3 Mon Sep 17 00:00:00 2001 From: Nick Cooke <36927374+ncooke3@users.noreply.github.com> Date: Wed, 13 Sep 2023 11:22:46 -0400 Subject: [PATCH] [Infra] Fix-up import tests (#11804) --- .github/workflows/client_app.yml | 2 +- ClientApp/Shared/objc-header-import-test.m | 8 +++----- ClientApp/Shared/objc-module-import-test.m | 4 +--- ClientApp/Shared/objcxx-header-import-test.mm | 6 ++---- ClientApp/Shared/objcxx-module-import-test.mm | 4 +--- ClientApp/Shared/swift-import-test.swift | 6 ++---- SwiftPMTests/objc-import-test/objc-header.m | 4 +--- SwiftPMTests/objc-import-test/objc-module.m | 4 +--- SwiftPMTests/swift-test/all-imports.swift | 9 ++++----- 9 files changed, 16 insertions(+), 31 deletions(-) diff --git a/.github/workflows/client_app.yml b/.github/workflows/client_app.yml index 96182e96c9a..01dfe58fbab 100644 --- a/.github/workflows/client_app.yml +++ b/.github/workflows/client_app.yml @@ -9,7 +9,7 @@ on: - "*.podspec" - "scripts/install_prereqs.sh" - "scripts/build.sh" - - "ClientApp/*" + - "ClientApp/**" - "Gemfile*" schedule: # Run every day at 12am (PST) - cron uses UTC times diff --git a/ClientApp/Shared/objc-header-import-test.m b/ClientApp/Shared/objc-header-import-test.m index e0eaf320008..5fb01124083 100644 --- a/ClientApp/Shared/objc-header-import-test.m +++ b/ClientApp/Shared/objc-header-import-test.m @@ -42,17 +42,15 @@ #import "FirebaseDynamicLinks/FirebaseDynamicLinks.h" #endif #import -#import "FirebaseFirestore/FirebaseFirestore.h" -#if (TARGET_OS_IOS || TARGET_OS_TV) && !TARGET_OS_MACCATALYST -#import -#import "FirebaseInAppMessaging/FirebaseInAppMessaging.h" -#endif #import #import +#import "FirebaseFirestore/FirebaseFirestore.h" #import "FirebaseInstallations/FirebaseInstallations.h" #import "FirebaseMessaging/FirebaseMessaging.h" #if (TARGET_OS_IOS && !TARGET_OS_MACCATALYST) || TARGET_OS_TV +#import #import +#import "FirebaseInAppMessaging/FirebaseInAppMessaging.h" #import "FirebasePerformance/FirebasePerformance.h" #endif #import diff --git a/ClientApp/Shared/objc-module-import-test.m b/ClientApp/Shared/objc-module-import-test.m index 8ce3f8b45cd..ae3f317307a 100644 --- a/ClientApp/Shared/objc-module-import-test.m +++ b/ClientApp/Shared/objc-module-import-test.m @@ -33,13 +33,11 @@ #endif @import FirebaseFirestore; @import FirebaseFunctions; -#if (TARGET_OS_IOS || TARGET_OS_TV) && !TARGET_OS_MACCATALYST -@import FirebaseInAppMessaging; -#endif @import FirebaseInstallations; @import FirebaseMessaging; #if (TARGET_OS_IOS && !TARGET_OS_MACCATALYST) || TARGET_OS_TV @import FirebasePerformance; +@import FirebaseInAppMessaging; #endif @import FirebaseRemoteConfig; @import FirebaseStorage; diff --git a/ClientApp/Shared/objcxx-header-import-test.mm b/ClientApp/Shared/objcxx-header-import-test.mm index e2968c32206..51620325bd3 100644 --- a/ClientApp/Shared/objcxx-header-import-test.mm +++ b/ClientApp/Shared/objcxx-header-import-test.mm @@ -44,10 +44,6 @@ // #endif // #import // #import "FirebaseFirestore/FirebaseFirestore.h" -// #if (TARGET_OS_IOS || TARGET_OS_TV) && !TARGET_OS_MACCATALYST -// #import -// #import "FirebaseInAppMessaging/FirebaseInAppMessaging.h" -// #endif // #import // #import // #import "FirebaseInstallations/FirebaseInstallations.h" @@ -55,6 +51,8 @@ // #if (TARGET_OS_IOS && !TARGET_OS_MACCATALYST) || TARGET_OS_TV // #import // #import "FirebasePerformance/FirebasePerformance.h" +// #import +// #import "FirebaseInAppMessaging/FirebaseInAppMessaging.h" // #endif // #import // #import "FirebaseRemoteConfig/FirebaseRemoteConfig.h" diff --git a/ClientApp/Shared/objcxx-module-import-test.mm b/ClientApp/Shared/objcxx-module-import-test.mm index eee0ddf95fc..7084851c18b 100644 --- a/ClientApp/Shared/objcxx-module-import-test.mm +++ b/ClientApp/Shared/objcxx-module-import-test.mm @@ -31,13 +31,11 @@ // #endif // @import FirebaseFirestore; // @import FirebaseFunctions; -// #if (TARGET_OS_IOS || TARGET_OS_TV) && !TARGET_OS_MACCATALYST -// @import FirebaseInAppMessaging; -// #endif // @import FirebaseInstallations; // @import FirebaseMessaging; // #if (TARGET_OS_IOS && !TARGET_OS_MACCATALYST) || TARGET_OS_TV // @import FirebasePerformance; +// @import FirebaseInAppMessaging; // #endif // @import FirebaseRemoteConfig; // @import FirebaseStorage; diff --git a/ClientApp/Shared/swift-import-test.swift b/ClientApp/Shared/swift-import-test.swift index 5fc7919a64c..edfe2f9296f 100644 --- a/ClientApp/Shared/swift-import-test.swift +++ b/ClientApp/Shared/swift-import-test.swift @@ -46,15 +46,13 @@ import FirebaseFunctions #if SWIFT_PACKAGE import FirebaseFunctionsCombineSwift #endif // SWIFT_PACKAGE -#if (os(iOS) || os(tvOS)) && !targetEnvironment(macCatalyst) - import FirebaseInAppMessaging - import FirebaseInAppMessagingSwift -#endif import FirebaseInstallations import FirebaseMessaging import FirebaseMLModelDownloader #if (os(iOS) && !targetEnvironment(macCatalyst)) || os(tvOS) import FirebasePerformance + import FirebaseInAppMessaging + import FirebaseInAppMessagingSwift #endif import FirebaseRemoteConfig import FirebaseRemoteConfigSwift diff --git a/SwiftPMTests/objc-import-test/objc-header.m b/SwiftPMTests/objc-import-test/objc-header.m index 1c9e562038f..f5673be5af8 100644 --- a/SwiftPMTests/objc-import-test/objc-header.m +++ b/SwiftPMTests/objc-import-test/objc-header.m @@ -24,12 +24,10 @@ #import "FirebaseDatabase/FirebaseDatabase.h" #import "FirebaseDynamicLinks/FirebaseDynamicLinks.h" #import "FirebaseFirestore/FirebaseFirestore.h" -#if TARGET_OS_IOS || TARGET_OS_TV -#import "FirebaseInAppMessaging/FirebaseInAppMessaging.h" -#endif #import "FirebaseInstallations/FirebaseInstallations.h" #import "FirebaseMessaging/FirebaseMessaging.h" #if (TARGET_OS_IOS && !TARGET_OS_MACCATALYST) || TARGET_OS_TV +#import "FirebaseInAppMessaging/FirebaseInAppMessaging.h" #import "FirebasePerformance/FirebasePerformance.h" #endif #import "FirebaseRemoteConfig/FirebaseRemoteConfig.h" diff --git a/SwiftPMTests/objc-import-test/objc-module.m b/SwiftPMTests/objc-import-test/objc-module.m index 215cad64c61..3f60b824127 100644 --- a/SwiftPMTests/objc-import-test/objc-module.m +++ b/SwiftPMTests/objc-import-test/objc-module.m @@ -25,12 +25,10 @@ @import FirebaseDynamicLinks; @import FirebaseFirestore; @import FirebaseFunctions; -#if TARGET_OS_IOS || TARGET_OS_TV -@import FirebaseInAppMessaging; -#endif @import FirebaseInstallations; @import FirebaseMessaging; #if (TARGET_OS_IOS && !TARGET_OS_MACCATALYST) || TARGET_OS_TV +@import FirebaseInAppMessaging; @import FirebasePerformance; #endif @import FirebaseRemoteConfig; diff --git a/SwiftPMTests/swift-test/all-imports.swift b/SwiftPMTests/swift-test/all-imports.swift index 0996dec53d5..b61ca9a68f2 100644 --- a/SwiftPMTests/swift-test/all-imports.swift +++ b/SwiftPMTests/swift-test/all-imports.swift @@ -27,15 +27,14 @@ import FirebaseDynamicLinks import FirebaseFirestore import FirebaseFirestoreSwift import FirebaseFunctions -#if (os(iOS) || os(tvOS)) && !targetEnvironment(macCatalyst) - import FirebaseInAppMessaging - @testable import FirebaseInAppMessagingSwift - import SwiftUI -#endif import FirebaseInstallations import FirebaseMessaging #if (os(iOS) && !targetEnvironment(macCatalyst)) || os(tvOS) import FirebasePerformance + + import FirebaseInAppMessaging + @testable import FirebaseInAppMessagingSwift + import SwiftUI #endif import FirebaseRemoteConfig import FirebaseSessions