Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
paulb777 committed Oct 26, 2024
1 parent fdc298e commit b02ab71
Show file tree
Hide file tree
Showing 15 changed files with 39 additions and 7 deletions.
4 changes: 4 additions & 0 deletions Crashlytics/UnitTests/FIRCLSMetricKitManagerTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@
#import <XCTest/XCTest.h>

#import "Crashlytics/Crashlytics/Controllers/FIRCLSMetricKitManager.h"

@import FirebaseCoreInternal;
#if SWIFT_PACKAGE
@import FirebaseCoreInternalObjC;
#endif

#if CLS_METRICKIT_SUPPORTED

Expand Down
3 changes: 3 additions & 0 deletions Crashlytics/UnitTests/FIRCLSOnDemandModelTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@
#import "Crashlytics/Crashlytics/Settings/Models/FIRCLSApplicationIdentifierModel.h"

@import FirebaseCoreInternal;
#if SWIFT_PACKAGE
@import FirebaseCoreInternalObjC;
#endif

#define TEST_GOOGLE_APP_ID (@"1:632950151350:ios:d5b0d08d4f00f4b1")

Expand Down
3 changes: 3 additions & 0 deletions Crashlytics/UnitTests/FIRCLSReportManagerTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
#import <XCTest/XCTest.h>

@import FirebaseCoreInternal;
#if SWIFT_PACKAGE
@import FirebaseCoreInternalObjC;
#endif

#if __has_include(<FBLPromises/FBLPromises.h>)
#import <FBLPromises/FBLPromises.h>
Expand Down
2 changes: 1 addition & 1 deletion FirebaseABTesting.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ Firebase Cloud Messaging and Firebase Remote Config in your app.
s.source_files = [
base_dir + '**/*.[mh]',
'Interop/Analytics/Public/*.h',
'FirebaseCore/Extension/*.h',
]
s.resource_bundles = {
"#{s.module_name}_Privacy" => 'FirebaseABTesting/Sources/Resources/PrivacyInfo.xcprivacy'
Expand All @@ -53,6 +52,7 @@ Firebase Cloud Messaging and Firebase Remote Config in your app.
'HEADER_SEARCH_PATHS' => '"${PODS_TARGET_SRCROOT}"'
}
s.dependency 'FirebaseCore', '11.5'
s.dependency 'FirebaseCoreExtension', '11.5'

s.test_spec 'unit' do |unit_tests|
unit_tests.scheme = { :code_coverage => true }
Expand Down
2 changes: 1 addition & 1 deletion FirebaseAppCheck.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ Pod::Spec.new do |s|

s.source_files = [
base_dir + 'Sources/**/*.[mh]',
'FirebaseCore/Extension/*.h',
]
s.public_header_files = base_dir + 'Sources/Public/FirebaseAppCheck/*.h'

Expand All @@ -47,6 +46,7 @@ Pod::Spec.new do |s|
s.dependency 'AppCheckCore', '~> 11.0'
s.dependency 'FirebaseAppCheckInterop', '~> 11.0'
s.dependency 'FirebaseCore', '11.5'
s.dependency 'FirebaseCoreExtension', '11.5'
s.dependency 'GoogleUtilities/Environment', '~> 8.0'
s.dependency 'GoogleUtilities/UserDefaults', '~> 8.0'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#import "FirebaseAppCheck/Sources/Core/FIRAppCheckValidator.h"
#import "FirebaseAppCheck/Sources/Core/FIRHeartbeatLogger+AppCheck.h"

@import FirebaseCoreExtension;
@import FirebaseCoreInternal;
#if SWIFT_PACKAGE
@import FirebaseCoreInternalObjC;
Expand Down
1 change: 0 additions & 1 deletion FirebaseCore.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ Firebase Core includes FIRApp and FIROptions which provide central configuration

# Remember to also update version in `cmake/external/GoogleUtilities.cmake`
s.dependency 'GoogleUtilities/Environment', '~> 8.0'
s.dependency 'GoogleUtilities/Logger', '~> 8.0'
s.dependency 'FirebaseCoreInternal', '11.5'

s.pod_target_xcconfig = {
Expand Down
6 changes: 5 additions & 1 deletion FirebaseCore/Tests/Unit/FIRComponentContainerTest.m
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,15 @@

#import "FirebaseCore/Tests/Unit/FIRTestCase.h"

#import "FirebaseCore/InternalObjC//FIRComponentType.h"
#import "FirebaseCore/Extension/FIRAppInternal.h"
#import "FirebaseCore/InternalObjC/FIRComponentContainer.h"
#import "FirebaseCore/InternalObjC/FIRComponentContainerInternal.h"
#import "FirebaseCore/InternalObjC/FIRComponentType.h"
#import "FirebaseCore/Tests/Unit/FIRTestComponents.h"
#import "SharedTestUtilities/FIROptionsMock.h"

@import FirebaseCore;

/// Internally exposed methods and properties for testing.
@interface FIRComponentContainer (TestInternal)

Expand Down
4 changes: 4 additions & 0 deletions FirebaseCore/Tests/Unit/FIRTestComponents.m
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@

#import "FirebaseCore/Tests/Unit/FIRTestComponents.h"

#import "FirebaseCore/Extension/FIRAppInternal.h"
#import "FirebaseCore/InternalObjC/FIRComponentContainer.h"
#import "FirebaseCore/InternalObjC/FIRComponentContainerInternal.h"
#import "FirebaseCore/InternalObjC/FIRComponentType.h"
#import "FirebaseCore/Tests/Unit/FIRTestComponents.h"

#pragma mark - Standard Component

Expand Down
2 changes: 2 additions & 0 deletions FirebaseCoreInternal.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ Pod::Spec.new do |s|

s.swift_version = '5.9'

s.dependency 'GoogleUtilities/Environment', '~> 8.0'
s.dependency 'GoogleUtilities/Logger', '~> 8.0'
s.dependency 'GoogleUtilities/NSData+zlib', '~> 8.0'

s.pod_target_xcconfig = {
Expand Down
2 changes: 1 addition & 1 deletion FirebaseDatabase.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ Simplify your iOS development, grow your user base, and monetize more effectivel
base_dir + 'third_party/Wrap-leveldb/APLevelDB.mm',
'FirebaseDatabase/Swift/Sources/**/*.swift',
'FirebaseAuth/Interop/**/*.h',
'FirebaseCore/Extension/*.h',
]
s.public_header_files = base_dir + 'Public/FirebaseDatabase/*.h'
s.libraries = ['c++', 'icucore']
Expand All @@ -48,6 +47,7 @@ Simplify your iOS development, grow your user base, and monetize more effectivel
s.watchos.frameworks = 'CFNetwork', 'Security', 'WatchKit'
s.dependency 'leveldb-library', '~> 1.22'
s.dependency 'FirebaseCore', '11.5'
s.dependency 'FirebaseCoreExtension', '11.5'
s.dependency 'FirebaseAppCheckInterop', '~> 11.0'
s.dependency 'FirebaseSharedSwift', '~> 11.0'
s.dependency 'GoogleUtilities/UserDefaults', '~> 8.0'
Expand Down
8 changes: 7 additions & 1 deletion FirebaseRemoteConfig/Tests/Unit/RCNInstanceIDTest.m
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,16 @@
#import "FirebaseRemoteConfig/Tests/Unit/RCNTestUtilities.h"

#import <GoogleUtilities/GULNSData+zlib.h>
#import "FirebaseCore/Extension/FirebaseCoreInternal.h"
#import "FirebaseInstallations/Source/Library/Private/FirebaseInstallationsInternal.h"
@import FirebaseRemoteConfigInterop;

@import FirebaseCore;
@import FirebaseCoreExtension;
@import FirebaseCoreInternal;
#if SWIFT_PACKAGE
@import FirebaseCoreInternalObjC;
#endif

@interface RCNConfigFetch (ForTest)
- (instancetype)initWithContent:(RCNConfigContent *)content
DBManager:(RCNConfigDBManager *)DBManager
Expand Down
3 changes: 3 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,8 @@ let package = Package(
name: "CoreUnit",
dependencies: [
"FirebaseCore",
"FirebaseCoreExtension",
"FirebaseCoreInternalObjC",
"SharedTestUtilities",
.product(name: "OCMock", package: "ocmock"),
],
Expand Down Expand Up @@ -943,6 +945,7 @@ let package = Package(
.target(
name: "SharedTestUtilities",
dependencies: ["FirebaseCore",
"FirebaseCoreInternalObjC",
"FirebaseAppCheckInterop",
"FirebaseAuthInterop",
"FirebaseMessagingInterop",
Expand Down
3 changes: 2 additions & 1 deletion SharedTestUtilities/FIRComponentTestUtilities.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@

#import <Foundation/Foundation.h>

@import FirebaseCoreInternal;
#if SWIFT_PACKAGE
@import FirebaseCoreInternalObjC;
#else
@import FirebaseCoreInternal;
#endif

NS_ASSUME_NONNULL_BEGIN
Expand Down
2 changes: 2 additions & 0 deletions scripts/check_imports.swift
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ private func checkFile(_ file: String, logger: ErrorLogger, inRepo repoURL: URL,
} else if inSwiftPackage, line.starts(with: "#else") {
inSwiftPackage = false
inSwiftPackageElse = true
} else if inSwiftPackage, line.starts(with: "#endif") {
inSwiftPackage = false
} else if inSwiftPackageElse, line.starts(with: "#endif") {
inSwiftPackageElse = false
} else if inSwiftPackage {
Expand Down

0 comments on commit b02ab71

Please sign in to comment.