Skip to content

Commit 8f77501

Browse files
committed
fix the fake console tests
1 parent af315bc commit 8f77501

File tree

6 files changed

+9
-24
lines changed

6 files changed

+9
-24
lines changed

FirebaseRemoteConfig/Sources/Private/FIRRemoteConfig_Private.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,6 @@ NS_ASSUME_NONNULL_BEGIN
2929

3030
@class RCNConfigSettings;
3131

32-
@interface FIRRemoteConfigUpdate ()
33-
34-
/// Designated initializer.
35-
- (instancetype)initWithUpdatedKeys:(NSSet<NSString *> *)updatedKeys;
36-
@end
37-
3832
@interface FIRRemoteConfig () {
3933
NSString *_FIRNamespace;
4034
}

FirebaseRemoteConfig/Sources/Public/FirebaseRemoteConfig/FIRRemoteConfig.h

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
#import <Foundation/Foundation.h>
1818

1919
@class FIRApp;
20+
@class FIRRemoteConfigUpdate;
2021

2122
/// The Firebase Remote Config service default namespace, to be used if the API method does not
2223
/// specify a different namespace. Use the default namespace if configuring from the Google Firebase
@@ -170,19 +171,6 @@ NS_SWIFT_NAME(RemoteConfigSettings)
170171
@property(nonatomic, assign) NSTimeInterval fetchTimeout;
171172
@end
172173

173-
#pragma mark - FIRRemoteConfigUpdate
174-
/// Used by Remote Config real-time config update service, this class represents changes between the
175-
/// newly fetched config and the current one. An instance of this class is passed to
176-
/// `FIRRemoteConfigUpdateCompletion` when a new config version has been automatically fetched.
177-
NS_SWIFT_NAME(RemoteConfigUpdate)
178-
@interface FIRRemoteConfigUpdate : NSObject
179-
180-
/// Parameter keys whose values have been updated from the currently activated values. Includes
181-
/// keys that are added, deleted, and whose value, value source, or metadata has changed.
182-
@property(nonatomic, readonly, nonnull) NSSet<NSString *> *updatedKeys;
183-
184-
@end
185-
186174
#pragma mark - FIRRemoteConfig
187175
/// Firebase Remote Config class. The class method `remoteConfig()` can be used
188176
/// to fetch, activate and read config results and set default config results on the default

FirebaseRemoteConfig/Sources/RCNConfigContent.m

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

1717
#import "FirebaseRemoteConfig/Sources/RCNConfigContent.h"
1818

19+
#import "FirebaseRemoteConfig/FirebaseRemoteConfig-Swift.h"
20+
1921
#import "FirebaseRemoteConfig/Sources/Private/FIRRemoteConfig_Private.h"
2022
#import "FirebaseRemoteConfig/Sources/Public/FirebaseRemoteConfig/FIRRemoteConfig.h"
2123
#import "FirebaseRemoteConfig/Sources/RCNConfigConstants.h"

FirebaseRemoteConfig/Sources/RCNConfigRealtime.m

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#import <GoogleUtilities/GULNSData+zlib.h>
2020
#import "FirebaseCore/Extension/FirebaseCoreInternal.h"
2121
#import "FirebaseInstallations/Source/Library/Private/FirebaseInstallationsInternal.h"
22+
#import "FirebaseRemoteConfig/FirebaseRemoteConfig-Swift.h"
2223
#import "FirebaseRemoteConfig/Sources/Private/RCNConfigFetch.h"
2324
#import "FirebaseRemoteConfig/Sources/Private/RCNConfigSettings.h"
2425
#import "FirebaseRemoteConfig/Sources/RCNConfigConstants.h"
@@ -167,7 +168,7 @@ - (void)propagateErrors:(NSError *)error {
167168
// TESTING ONLY
168169
- (void)triggerListenerForTesting:(void (^_Nonnull)(FIRRemoteConfigUpdate *configUpdate,
169170
NSError *_Nullable error))listener {
170-
listener([[FIRRemoteConfigUpdate alloc] init], nil);
171+
listener([[FIRRemoteConfigUpdate alloc] initWithUpdatedKeys:[[NSSet alloc] init]], nil);
171172
}
172173

173174
#pragma mark - Http Helpers

FirebaseRemoteConfig/SwiftNew/RemoteConfigUpdate.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@
1515
import Foundation
1616

1717
@objc(FIRRemoteConfigUpdate)
18-
class RemoteConfigUpdate: NSObject {
18+
public class RemoteConfigUpdate: NSObject {
1919
private let _updatedKeys: Set<String>
2020

21-
@objc init(updatedKeys: Set<String>) {
21+
@objc public init(updatedKeys: Set<String>) {
2222
_updatedKeys = updatedKeys
2323
}
2424

25-
@objc var updatedKeys: Set<String> {
25+
@objc public var updatedKeys: Set<String> {
2626
return _updatedKeys
2727
}
2828
}

FirebaseRemoteConfig/Tests/Swift/SwiftAPI/FirebaseRemoteConfigSwift_APIBuildTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ final class FirebaseRemoteConfig_APIBuildTests: XCTestCase {
107107
settings.fetchTimeout = TimeInterval(100)
108108

109109
// TODO(ncooke3): This should probably not be initializable.
110-
let update = FirebaseRemoteConfig.RemoteConfigUpdate()
110+
let update = FirebaseRemoteConfig.RemoteConfigUpdate(updatedKeys: Set<String>())
111111
let _: Set<String> = update.updatedKeys
112112

113113
let _ = FirebaseRemoteConfig.RemoteConfig.remoteConfig()

0 commit comments

Comments
 (0)