diff --git a/FirebasePerformance/Sources/Configurations/FPRRemoteConfigFlags+Private.h b/FirebasePerformance/Sources/Configurations/FPRRemoteConfigFlags+Private.h index 699ccd3bed3a..8039d34dff96 100644 --- a/FirebasePerformance/Sources/Configurations/FPRRemoteConfigFlags+Private.h +++ b/FirebasePerformance/Sources/Configurations/FPRRemoteConfigFlags+Private.h @@ -18,6 +18,19 @@ NS_ASSUME_NONNULL_BEGIN +@interface FIRRemoteConfig () ++ (FIRRemoteConfig *)remoteConfigWithFIRNamespace:(NSString *)remoteConfigNamespace + app:(FIRApp *)app; +@end + +@interface FIRRemoteConfigValue () +@property(nonatomic, readwrite, assign) FIRRemoteConfigSource source; + +/// Designated initializer. +- (instancetype)initWithData:(nullable NSData *)data + source:(FIRRemoteConfigSource)source NS_DESIGNATED_INITIALIZER; +@end + @class GULUserDefaults; static NSString *const kFPRConfigPrefix = @"com.fireperf"; diff --git a/FirebaseRemoteConfig/Sources/Public/FirebaseRemoteConfig/FIRRemoteConfig.h b/FirebaseRemoteConfig/Sources/Public/FirebaseRemoteConfig/FIRRemoteConfig.h index 5513f41bb62f..459b898b76f6 100644 --- a/FirebaseRemoteConfig/Sources/Public/FirebaseRemoteConfig/FIRRemoteConfig.h +++ b/FirebaseRemoteConfig/Sources/Public/FirebaseRemoteConfig/FIRRemoteConfig.h @@ -354,18 +354,5 @@ typedef void (^FIRRemoteConfigUpdateCompletion)(FIRRemoteConfigUpdate *_Nullable userDefaults:(nullable NSUserDefaults *)userDefaults analytics:(nullable id)analytics; -/// Firebase INTERNAL use only! -/// Returns the FIRRemoteConfig instance for your namespace and for the default 3P developer's app. -/// This singleton object contains the complete set of Remote Config parameter values available to -/// the app, including the Active Config and Default Config. This object also caches values fetched -/// from the Remote Config Server until they are copied to the Active Config by calling -/// activateFetched. When you fetch values from the Remote Config Server using the default Firebase -/// namespace service, you should use this class method to create a shared instance of the -/// FIRRemoteConfig object to ensure that your app will function properly with the Remote Config -/// Server and the Firebase service. -+ (FIRRemoteConfig *)remoteConfigWithFIRNamespace:(NSString *)remoteConfigNamespace - app:(FIRApp *)app - NS_SWIFT_NAME(remoteConfig(FIRNamespace:app:)); - @end NS_ASSUME_NONNULL_END diff --git a/FirebaseRemoteConfig/SwiftNew/RemoteConfigValue.swift b/FirebaseRemoteConfig/SwiftNew/RemoteConfigValue.swift index e062c21d36d6..3928c19a738e 100644 --- a/FirebaseRemoteConfig/SwiftNew/RemoteConfigValue.swift +++ b/FirebaseRemoteConfig/SwiftNew/RemoteConfigValue.swift @@ -15,6 +15,8 @@ import FirebaseCore import Foundation +// TODO: Some objc's and public's should be removed. + @objc(FIRRemoteConfigValue) public class RemoteConfigValue: NSObject, NSCopying { /// Data backing the config value. @@ -24,8 +26,8 @@ public class RemoteConfigValue: NSObject, NSCopying { @objc public let source: RemoteConfigSource /// Designated initializer. Only for Firebase internal use. - @objc public init(data: Data, source: RemoteConfigSource) { - dataValue = data + @objc public init(data: Data?, source: RemoteConfigSource) { + dataValue = data ?? Data() self.source = source }