Skip to content

Commit 8f44bbc

Browse files
authored
Fix FIROptions module organization (#13765)
1 parent b2f1e26 commit 8f44bbc

33 files changed

+109
-100
lines changed

.github/workflows/installations.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
run: |
5656
export FIS_INTEGRATION_TESTS_REQUIRED=${{ steps.secrets.outputs.val }}
5757
scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseInstallations.podspec \
58-
--platforms=${{ matrix.target }} --test-specs=--platforms=${{ matrix.test-specs }}
58+
--platforms=${{ matrix.target }} --test-specs=${{ matrix.test-specs }}
5959
6060
spm-package-resolved:
6161
env:

FirebaseABTesting/Tests/Unit/ABTConditionalUserPropertyControllerTest.m

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,9 @@ - (void)setUp {
6565

6666
// Must initialize FIRApp before calling set experiment as Firebase Analytics internal event
6767
// logging requires it.
68-
NSDictionary *optionsDictionary = @{
69-
kFIRGoogleAppID : @"1:123456789012:ios:1234567890123456",
70-
@"GCM_SENDER_ID" : @"123456789012"
71-
};
72-
FIROptions *options = [[FIROptions alloc] initInternalWithOptionsDictionary:optionsDictionary];
68+
FIROptions *options =
69+
[[FIROptions alloc] initWithGoogleAppID:@"1:123456789012:ios:1234567890123456"
70+
GCMSenderID:@"123456789012"];
7371
[FIRApp configureWithOptions:options];
7472
}
7573

FirebaseAppCheck/Tests/Unit/Core/FIRAppCheckValidatorTests.m

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,18 @@
1717
#import <XCTest/XCTest.h>
1818

1919
#import "FirebaseAppCheck/Sources/Core/FIRAppCheckValidator.h"
20-
#import "FirebaseCore/Extension/FIROptionsInternal.h"
20+
#import "FirebaseCore/Sources/Public/FirebaseCore/FIROptions.h"
2121

2222
@interface FIRAppCheckValidatorTests : XCTestCase
2323
@end
2424

2525
@implementation FIRAppCheckValidatorTests
2626

2727
- (void)test_tokenExchangeMissingFieldsInOptions_noMissingFields {
28-
FIROptions *options = [[FIROptions alloc] initInternalWithOptionsDictionary:@{
29-
kFIRGoogleAppID : @"TEST_GoogleAppID",
30-
kFIRAPIKey : @"TEST_APIKey",
31-
kFIRProjectID : @"TEST_ProjectID"
32-
}];
28+
FIROptions *options = [[FIROptions alloc] initWithGoogleAppID:@"TEST_GoogleAppID"
29+
GCMSenderID:@"TEST_GCMSenderID"];
30+
options.APIKey = @"TEST_APIKey";
31+
options.projectID = @"TEST_ProjectID";
3332

3433
NSArray *missingFields = [FIRAppCheckValidator tokenExchangeMissingFieldsInOptions:options];
3534

@@ -38,11 +37,10 @@ - (void)test_tokenExchangeMissingFieldsInOptions_noMissingFields {
3837

3938
- (void)test_tokenExchangeMissingFieldsInOptions_singleMissingField {
4039
// Google App ID is empty:
41-
FIROptions *options = [[FIROptions alloc] initInternalWithOptionsDictionary:@{
42-
kFIRGoogleAppID : @"",
43-
kFIRAPIKey : @"TEST_APIKey",
44-
kFIRProjectID : @"TEST_ProjectID"
45-
}];
40+
FIROptions *options = [[FIROptions alloc] initWithGoogleAppID:@""
41+
GCMSenderID:@"TEST_GCMSenderID"];
42+
options.APIKey = @"TEST_APIKey";
43+
options.projectID = @"TEST_ProjectID";
4644

4745
NSArray *missingFields = [FIRAppCheckValidator tokenExchangeMissingFieldsInOptions:options];
4846

@@ -51,8 +49,8 @@ - (void)test_tokenExchangeMissingFieldsInOptions_singleMissingField {
5149

5250
- (void)test_tokenExchangeMissingFieldsInOptions_multipleMissingFields {
5351
// Google App ID is empty, and API Key and Project ID are not set:
54-
FIROptions *options =
55-
[[FIROptions alloc] initInternalWithOptionsDictionary:@{kFIRGoogleAppID : @""}];
52+
FIROptions *options = [[FIROptions alloc] initWithGoogleAppID:@""
53+
GCMSenderID:@"TEST_GCMSenderID"];
5654

5755
NSArray *missingFields = [FIRAppCheckValidator tokenExchangeMissingFieldsInOptions:options];
5856

FirebaseAppDistribution/Sources/FIRFADLogger.m

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
#import "FirebaseAppDistribution/Sources/FIRFADLogger.h"
1616
#import "FirebaseCore/Extension/FIRLogger.h"
17+
#import "FirebaseCore/Sources/Public/FirebaseCore/FIRLoggerLevel.h"
1718

1819
FIRLoggerService kFIRLoggerAppDistribution = @"[FirebaseAppDistribution]";
1920

FirebaseAuth.podspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ supports email and password accounts, as well as several 3rd party authenticatio
5858
s.ios.framework = 'SafariServices'
5959
s.dependency 'FirebaseAuthInterop', '~> 11.0'
6060
s.dependency 'FirebaseAppCheckInterop', '~> 11.0'
61-
s.dependency 'FirebaseCore', '~> 11.0'
62-
s.dependency 'FirebaseCoreExtension', '~> 11.0'
61+
s.dependency 'FirebaseCore', '~> 11.4'
62+
s.dependency 'FirebaseCoreExtension', '~> 11.4'
6363
s.dependency 'GoogleUtilities/AppDelegateSwizzler', '~> 8.0'
6464
s.dependency 'GoogleUtilities/Environment', '~> 8.0'
6565
s.dependency 'GTMSessionFetcher/Core', '>= 3.4', '< 5.0'

FirebaseCore/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Firebase 11.4.0
2+
- [fixed] Fixed issue building documentation with some Firebase products. (#13756)
3+
14
# Firebase 11.0.0
25
- [changed] **Breaking change**: Firebase's minimum supported versions have
36
updated for the following platforms:

FirebaseCore/Extension/FIRAppInternal.h

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,27 @@ extern NSString *const kFIRAppNameKey;
4040
extern NSString *const kFIRGoogleAppIDKey;
4141
extern NSString *const kFirebaseCoreErrorDomain;
4242

43+
/**
44+
* Keys for the strings in the plist file.
45+
*/
46+
extern NSString *const kFIRAPIKey;
47+
extern NSString *const kFIRTrackingID;
48+
extern NSString *const kFIRGoogleAppID;
49+
extern NSString *const kFIRClientID;
50+
extern NSString *const kFIRGCMSenderID;
51+
extern NSString *const kFIRAndroidClientID;
52+
extern NSString *const kFIRDatabaseURL;
53+
extern NSString *const kFIRStorageBucket;
54+
extern NSString *const kFIRBundleID;
55+
extern NSString *const kFIRProjectID;
56+
57+
/**
58+
* Keys for the plist file name
59+
*/
60+
extern NSString *const kServiceInfoFileName;
61+
62+
extern NSString *const kServiceInfoFileType;
63+
4364
/**
4465
* The format string for the `UserDefaults` key used for storing the data collection enabled flag.
4566
* This includes formatting to append the `FirebaseApp`'s name.

FirebaseCore/Extension/FIRLogger.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
#import <Foundation/Foundation.h>
1818

19-
#import <FirebaseCore/FIRLoggerLevel.h>
19+
typedef NS_ENUM(NSInteger, FIRLoggerLevel);
2020

2121
NS_ASSUME_NONNULL_BEGIN
2222

@@ -132,7 +132,7 @@ NS_SWIFT_NAME(FirebaseLogger)
132132
///
133133
/// - Parameters:
134134
/// - level: The log level to use (defined by `FirebaseLoggerLevel` enum values).
135-
/// - service: The service name of type `FirebaseLoggerService`.
135+
/// - category: The service name of type `FirebaseLoggerService`.
136136
/// - code: The message code. Starting with "I-" which means iOS, followed by a capitalized
137137
/// three-character service identifier and a six digit integer message ID that is unique within
138138
/// the service. An example of the message code is @"I-COR000001".

FirebaseCore/Extension/FirebaseCoreInternal.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,3 @@
2121
#import "FIRHeartbeatLogger.h"
2222
#import "FIRLibrary.h"
2323
#import "FIRLogger.h"
24-
#import "FIROptionsInternal.h"

FirebaseCore/Sources/FIRApp.m

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@
3838
#import "FirebaseCore/Extension/FIRHeartbeatLogger.h"
3939
#import "FirebaseCore/Extension/FIRLibrary.h"
4040
#import "FirebaseCore/Extension/FIRLogger.h"
41-
#import "FirebaseCore/Extension/FIROptionsInternal.h"
41+
#import "FirebaseCore/Sources/FIROptionsInternal.h"
42+
#import "FirebaseCore/Sources/Public/FirebaseCore/FIROptions.h"
4243
#import "FirebaseCore/Sources/Public/FirebaseCore/FIRVersion.h"
4344

4445
#import <GoogleUtilities/GULAppEnvironmentUtil.h>

0 commit comments

Comments
 (0)