Skip to content

Commit 0b1a39d

Browse files
committed
[rc-swift] ConfigContent.swift
1 parent 0f7fd3f commit 0b1a39d

File tree

14 files changed

+553
-647
lines changed

14 files changed

+553
-647
lines changed

FirebaseRemoteConfig/Sources/FIRRemoteConfig.m

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
#import "FirebaseRemoteConfig/Sources/Private/RCNConfigFetch.h"
2424
#import "FirebaseRemoteConfig/Sources/Private/RCNConfigSettings.h"
2525
#import "FirebaseRemoteConfig/Sources/RCNConfigConstants.h"
26-
#import "FirebaseRemoteConfig/Sources/RCNConfigContent.h"
2726
#import "FirebaseRemoteConfig/Sources/RCNConfigExperiment.h"
2827
#import "FirebaseRemoteConfig/Sources/RCNConfigRealtime.h"
2928
#import "FirebaseRemoteConfig/Sources/RCNConfigValue_Internal.h"
@@ -343,9 +342,9 @@ - (void)activateWithCompletion:(FIRRemoteConfigActivateChangeCompletion)completi
343342
}
344343
return;
345344
}
346-
[strongSelf->_configContent copyFromDictionary:self->_configContent.fetchedConfig
345+
[strongSelf->_configContent copyFromDictionary:strongSelf->_configContent.fetchedConfig
347346
toSource:RCNDBSourceActive
348-
forNamespace:self->_FIRNamespace];
347+
forNamespace:strongSelf->_FIRNamespace];
349348
strongSelf->_settings.lastApplyTimeInterval = [[NSDate date] timeIntervalSince1970];
350349
// New config has been activated at this point
351350
FIRLogDebug(kFIRLoggerRemoteConfig, @"I-RCN000069", @"Config activated.");

FirebaseRemoteConfig/Sources/FIRRemoteConfigComponent.m

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818

1919
#import "FirebaseCore/Extension/FirebaseCoreInternal.h"
2020
#import "FirebaseRemoteConfig/Sources/Private/FIRRemoteConfig_Private.h"
21-
#import "FirebaseRemoteConfig/Sources/RCNConfigContent.h"
2221
#import "Interop/Analytics/Public/FIRAnalyticsInterop.h"
2322

2423
#import "FirebaseRemoteConfig/FirebaseRemoteConfig-Swift.h"

FirebaseRemoteConfig/Sources/Private/FIRRemoteConfig_Private.h

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,6 @@ NS_ASSUME_NONNULL_BEGIN
3333
NSString *_FIRNamespace;
3434
}
3535

36-
/// Internal settings
37-
@property(nonatomic, readonly, strong) RCNConfigSettings *settings;
38-
3936
/// Config settings are custom settings.
4037
@property(nonatomic, readwrite, strong, nonnull) RCNConfigFetch *configFetch;
4138

@@ -64,23 +61,6 @@ NS_ASSUME_NONNULL_BEGIN
6461
app:(FIRApp *)app
6562
NS_SWIFT_NAME(remoteConfig(FIRNamespace:app:));
6663

67-
/// Initialize a FIRRemoteConfig instance with all the required parameters directly. This exists so
68-
/// tests can create FIRRemoteConfig objects without needing FIRApp.
69-
- (instancetype)initWithAppName:(NSString *)appName
70-
FIROptions:(FIROptions *)options
71-
namespace:(NSString *)FIRNamespace
72-
DBManager:(RCNConfigDBManager *)DBManager
73-
configContent:(RCNConfigContent *)configContent
74-
analytics:(nullable id<FIRAnalyticsInterop>)analytics;
75-
76-
- (instancetype)initWithAppName:(NSString *)appName
77-
FIROptions:(FIROptions *)options
78-
namespace:(NSString *)FIRNamespace
79-
DBManager:(RCNConfigDBManager *)DBManager
80-
configContent:(RCNConfigContent *)configContent
81-
userDefaults:(nullable NSUserDefaults *)userDefaults
82-
analytics:(nullable id<FIRAnalyticsInterop>)analytics;
83-
8464
/// Register RolloutsStateSubcriber to FIRRemoteConfig instance
8565
- (void)addRemoteConfigInteropSubscriber:(id<FIRRolloutsStateSubscriber> _Nonnull)subscriber;
8666

FirebaseRemoteConfig/Sources/Public/FirebaseRemoteConfig/FIRRemoteConfig.h

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@
1818

1919
@class FIRApp;
2020
@class FIRRemoteConfigUpdate;
21+
@class RCNConfigDBManager;
22+
@class RCNConfigContent;
23+
@class FIROptions;
24+
@class RCNConfigSettings;
25+
@protocol FIRAnalyticsInterop;
2126

2227
/// The Firebase Remote Config service default namespace, to be used if the API method does not
2328
/// specify a different namespace. Use the default namespace if configuring from the Google Firebase
@@ -350,4 +355,25 @@ typedef void (^FIRRemoteConfigUpdateCompletion)(FIRRemoteConfigUpdate *_Nullable
350355
(FIRRemoteConfigUpdateCompletion _Nonnull)listener
351356
NS_SWIFT_NAME(addOnConfigUpdateListener(remoteConfigUpdateCompletion:));
352357

358+
// TODO: Below here is temporary public for Swift port
359+
360+
@property(nonatomic, readonly, strong) RCNConfigSettings *settings;
361+
362+
/// Initialize a FIRRemoteConfig instance with all the required parameters directly. This exists so
363+
/// tests can create FIRRemoteConfig objects without needing FIRApp.
364+
- (instancetype)initWithAppName:(NSString *)appName
365+
FIROptions:(FIROptions *)options
366+
namespace:(NSString *)FIRNamespace
367+
DBManager:(RCNConfigDBManager *)DBManager
368+
configContent:(RCNConfigContent *)configContent
369+
analytics:(nullable id<FIRAnalyticsInterop>)analytics;
370+
371+
- (instancetype)initWithAppName:(NSString *)appName
372+
FIROptions:(FIROptions *)options
373+
namespace:(NSString *)FIRNamespace
374+
DBManager:(RCNConfigDBManager *)DBManager
375+
configContent:(RCNConfigContent *)configContent
376+
userDefaults:(nullable NSUserDefaults *)userDefaults
377+
analytics:(nullable id<FIRAnalyticsInterop>)analytics;
378+
353379
@end

FirebaseRemoteConfig/Sources/RCNConfigContent.h

Lines changed: 0 additions & 71 deletions
This file was deleted.

0 commit comments

Comments
 (0)