Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/workflows/performance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,6 @@ jobs:
matrix:
target: [ios, tvos]
build-env:
- os: macos-14
xcode: Xcode_15.2
- os: macos-15
xcode: Xcode_16.1
runs-on: ${{ matrix.build-env.os }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,23 @@

#import "FirebasePerformance/Sources/Configurations/FPRRemoteConfigFlags.h"

#import "FirebaseRemoteConfig/Sources/Private/FIRRemoteConfig_Private.h"
@import FirebaseRemoteConfig;

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";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@

#import "FirebaseCore/Extension/FirebaseCoreInternal.h"

@import FirebaseRemoteConfig;

#define ONE_DAY_SECONDS 24 * 60 * 60

static NSDate *FPRAppStartTime = nil;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@

#import <Foundation/Foundation.h>

#import "FirebaseRemoteConfig/Sources/Private/FIRRemoteConfig_Private.h"
#import "FirebaseRemoteConfig/Sources/RCNConfigValue_Internal.h"
@import FirebaseRemoteConfig;

@import FirebaseRemoteConfig;
Comment on lines +18 to +19
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
@import FirebaseRemoteConfig;


NS_ASSUME_NONNULL_BEGIN

Expand All @@ -37,6 +38,8 @@ NS_ASSUME_NONNULL_BEGIN
/** @brief Different configurations values that needs to be stored and returned. */
@property(nonatomic) NSMutableDictionary<NSString *, FIRRemoteConfigValue *> *configValues;

- (instancetype)init;

/**
* Fake fetch call for fetching configs. Calling this method will just call the completionHandler.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@

#import "FirebasePerformance/Tests/Unit/Configurations/FPRFakeRemoteConfig.h"

@import FirebaseRemoteConfig;

static NSInteger const kLogSource = 462; // LogRequest_LogSource_Fireperf

@interface FPRRemoteConfigFlagsTest : XCTestCase
Expand Down Expand Up @@ -65,7 +67,7 @@ - (void)testCacheResetAfterEverySuccessfulFetch {
forKey:@"fpr_vc_session_sampling_rate"];

// Trigger the RC config fetch
remoteConfig.fetchStatus = FIRRemoteConfigFetchStatusSuccess;
remoteConfig.fetchStatus = FIRRemoteConfigFetchAndActivateStatusSuccessUsingPreFetchedData;
remoteConfig.lastFetchTime = nil;
configFlags.appStartConfigFetchDelayInSeconds = 0.0;
[configFlags update];
Expand All @@ -92,7 +94,7 @@ - (void)testCacheResetAfterEverySuccessfulFetch {
forKey:@"fpr_vc_session_sampling_rate"];

// Retrigger the RC config fetch
remoteConfig.fetchStatus = FIRRemoteConfigFetchStatusSuccess;
remoteConfig.fetchStatus = FIRRemoteConfigFetchAndActivateStatusSuccessUsingPreFetchedData;
remoteConfig.lastFetchTime = nil;
[configFlags update];

Expand All @@ -112,7 +114,7 @@ - (void)testConfigUpdate {

FPRRemoteConfigFlags *configFlags =
[[FPRRemoteConfigFlags alloc] initWithRemoteConfig:(FIRRemoteConfig *)remoteConfig];
remoteConfig.fetchStatus = FIRRemoteConfigFetchStatusSuccess;
remoteConfig.fetchStatus = FIRRemoteConfigFetchAndActivateStatusSuccessUsingPreFetchedData;
configFlags.appStartConfigFetchDelayInSeconds = 0.0;
[configFlags update];
XCTAssertNotNil(configFlags.lastFetchedTime);
Expand Down Expand Up @@ -179,7 +181,7 @@ - (void)testConfigUpdateDoesNotHappenImmediately {
FPRRemoteConfigFlags *configFlags =
[[FPRRemoteConfigFlags alloc] initWithRemoteConfig:(FIRRemoteConfig *)remoteConfig];

remoteConfig.fetchStatus = FIRRemoteConfigFetchStatusSuccess;
remoteConfig.fetchStatus = FIRRemoteConfigFetchAndActivateStatusSuccessUsingPreFetchedData;
configFlags.appStartConfigFetchDelayInSeconds = 0.0;
[configFlags update];
XCTAssertNotNil(configFlags.lastFetchedTime);
Expand All @@ -203,7 +205,7 @@ - (void)testConfigUpdateHappensIfInitialFetchHasNotHappened {
FPRRemoteConfigFlags *configFlags =
[[FPRRemoteConfigFlags alloc] initWithRemoteConfig:(FIRRemoteConfig *)remoteConfig];

remoteConfig.fetchStatus = FIRRemoteConfigFetchStatusSuccess;
remoteConfig.fetchStatus = FIRRemoteConfigFetchAndActivateStatusSuccessUsingPreFetchedData;
configFlags.appStartConfigFetchDelayInSeconds = 0.0;
[configFlags update];
XCTAssertNotNil(configFlags.lastFetchedTime);
Expand All @@ -224,7 +226,7 @@ - (void)testConfigFetchHappensDoesNotHappenImmediately {
[[FPRRemoteConfigFlags alloc] initWithRemoteConfig:(FIRRemoteConfig *)remoteConfig];
// Setting the status to success. Calling update on the config flags should trigger updation of
// fetch time. Fetch would trigger activation.
remoteConfig.fetchStatus = FIRRemoteConfigFetchStatusSuccess;
remoteConfig.fetchStatus = FIRRemoteConfigFetchAndActivateStatusSuccessUsingPreFetchedData;
NSDate *lastActivatedTime = configFlags.lastFetchedTime;
[configFlags update];
XCTAssert([configFlags.lastFetchedTime timeIntervalSinceDate:lastActivatedTime] == 0);
Expand All @@ -240,7 +242,7 @@ - (void)testConfigFetchHappensAfterDelay {
[[FPRRemoteConfigFlags alloc] initWithRemoteConfig:(FIRRemoteConfig *)remoteConfig];
configFlags.appStartConfigFetchDelayInSeconds = 0.0;

remoteConfig.fetchStatus = FIRRemoteConfigFetchStatusSuccess;
remoteConfig.fetchStatus = FIRRemoteConfigFetchAndActivateStatusSuccessUsingPreFetchedData;
XCTestExpectation *expectation =
[self expectationWithDescription:@"Dummy expectation to wait for the fetch delay."];
dispatch_after(
Expand Down
2 changes: 1 addition & 1 deletion FirebasePerformance/Tests/Unit/Timer/FIRTraceTest.m
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#import "FirebasePerformance/Tests/Unit/Configurations/FPRFakeRemoteConfig.h"
#import "FirebasePerformance/Tests/Unit/FPRTestCase.h"

#import "FirebaseRemoteConfig/Sources/RCNConfigValue_Internal.h"
@import FirebaseRemoteConfig;

#import <OCMock/OCMock.h>

Expand Down
91 changes: 0 additions & 91 deletions FirebaseRemoteConfig/Sources/FIRConfigValue.m

This file was deleted.

1 change: 0 additions & 1 deletion FirebaseRemoteConfig/Sources/FIRRemoteConfig.m
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
#import "FirebaseRemoteConfig/Sources/Private/RCNConfigSettings.h"
#import "FirebaseRemoteConfig/Sources/RCNConfigConstants.h"
#import "FirebaseRemoteConfig/Sources/RCNConfigRealtime.h"
#import "FirebaseRemoteConfig/Sources/RCNConfigValue_Internal.h"
#import "FirebaseRemoteConfig/Sources/RCNPersonalization.h"

#import "FirebaseRemoteConfig/FirebaseRemoteConfig-Swift.h"
Expand Down
12 changes: 0 additions & 12 deletions FirebaseRemoteConfig/Sources/Private/FIRRemoteConfig_Private.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,18 +49,6 @@ NS_ASSUME_NONNULL_BEGIN
+ (FIRRemoteConfig *)remoteConfigWithFIRNamespace:(NSString *)remoteConfigNamespace
NS_SWIFT_NAME(remoteConfig(FIRNamespace:));

/// 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:));

/// Register RolloutsStateSubcriber to FIRRemoteConfig instance
- (void)addRemoteConfigInteropSubscriber:(id<FIRRolloutsStateSubscriber> _Nonnull)subscriber;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
@class RCNConfigContent;
@class FIROptions;
@class RCNConfigSettings;
@class FIRRemoteConfigValue;
@protocol FIRAnalyticsInterop;

/// The Firebase Remote Config service default namespace, to be used if the API method does not
Expand Down Expand Up @@ -139,31 +140,6 @@ typedef void (^FIRRemoteConfigFetchAndActivateCompletion)(
FIRRemoteConfigFetchAndActivateStatus status, NSError *_Nullable error)
NS_SWIFT_UNAVAILABLE("Use Swift's closure syntax instead.");

#pragma mark - FIRRemoteConfigValue
/// This class provides a wrapper for Remote Config parameter values, with methods to get parameter
/// values as different data types.
NS_SWIFT_NAME(RemoteConfigValue)
@interface FIRRemoteConfigValue : NSObject <NSCopying>
/// Gets the value as a string.
@property(nonatomic, readonly, nonnull) NSString *stringValue;
/// Gets the value as a number value.
@property(nonatomic, readonly, nonnull) NSNumber *numberValue;
/// Gets the value as a NSData object.
@property(nonatomic, readonly, nonnull) NSData *dataValue;
/// Gets the value as a boolean.
@property(nonatomic, readonly) BOOL boolValue;
/// Gets a foundation object (NSDictionary / NSArray) by parsing the value as JSON. This method uses
/// NSJSONSerialization's JSONObjectWithData method with an options value of 0.
@property(nonatomic, readonly, nullable) id JSONValue NS_SWIFT_NAME(jsonValue);
/// Identifies the source of the fetched value.
@property(nonatomic, readonly) FIRRemoteConfigSource source;

/// TODO: internal API for temporary bridging
/// Designated initializer.
- (instancetype _Nonnull)initWithData:(nullable NSData *)data
source:(FIRRemoteConfigSource)source NS_DESIGNATED_INITIALIZER;
@end

#pragma mark - FIRRemoteConfigSettings
/// Firebase Remote Config settings.
NS_SWIFT_NAME(RemoteConfigSettings)
Expand Down
1 change: 0 additions & 1 deletion FirebaseRemoteConfig/Sources/RCNConfigSettings.m
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@

#import "FirebaseRemoteConfig/Sources/Private/RCNConfigSettings.h"

#import "FirebaseRemoteConfig/FirebaseRemoteConfig-Swift.h"

Check failure on line 19 in FirebaseRemoteConfig/Sources/RCNConfigSettings.m

View workflow job for this annotation

GitHub Actions / spm (macos-14, Xcode_15.4, iOS)

'FirebaseRemoteConfig/FirebaseRemoteConfig-Swift.h' file not found

Check failure on line 19 in FirebaseRemoteConfig/Sources/RCNConfigSettings.m

View workflow job for this annotation

GitHub Actions / spm (macos-15, Xcode_16.1, iOS)

'FirebaseRemoteConfig/FirebaseRemoteConfig-Swift.h' file not found

Check failure on line 19 in FirebaseRemoteConfig/Sources/RCNConfigSettings.m

View workflow job for this annotation

GitHub Actions / spm (macos-15, Xcode_16.1, tvOS)

'FirebaseRemoteConfig/FirebaseRemoteConfig-Swift.h' file not found

#import "FirebaseRemoteConfig/Sources/RCNConfigConstants.h"
#import "FirebaseRemoteConfig/Sources/RCNConfigValue_Internal.h"

#import <GoogleUtilities/GULAppEnvironmentUtil.h>
#import "FirebaseCore/Extension/FirebaseCoreInternal.h"
Expand Down
27 changes: 0 additions & 27 deletions FirebaseRemoteConfig/Sources/RCNConfigValue_Internal.h

This file was deleted.

2 changes: 1 addition & 1 deletion FirebaseRemoteConfig/Sources/RCNPersonalization.m
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

#import "FirebaseRemoteConfig/Sources/RCNPersonalization.h"

#import "FirebaseRemoteConfig/FirebaseRemoteConfig-Swift.h"

Check failure on line 19 in FirebaseRemoteConfig/Sources/RCNPersonalization.m

View workflow job for this annotation

GitHub Actions / spm (macos-14, Xcode_15.4, iOS)

'FirebaseRemoteConfig/FirebaseRemoteConfig-Swift.h' file not found

Check failure on line 19 in FirebaseRemoteConfig/Sources/RCNPersonalization.m

View workflow job for this annotation

GitHub Actions / spm (macos-14, Xcode_15.4, iOS)

'FirebaseRemoteConfig/FirebaseRemoteConfig-Swift.h' file not found

Check failure on line 19 in FirebaseRemoteConfig/Sources/RCNPersonalization.m

View workflow job for this annotation

GitHub Actions / spm (macos-15, Xcode_16.1, iOS)

'FirebaseRemoteConfig/FirebaseRemoteConfig-Swift.h' file not found

Check failure on line 19 in FirebaseRemoteConfig/Sources/RCNPersonalization.m

View workflow job for this annotation

GitHub Actions / spm (macos-15, Xcode_16.1, iOS)

'FirebaseRemoteConfig/FirebaseRemoteConfig-Swift.h' file not found

Check failure on line 19 in FirebaseRemoteConfig/Sources/RCNPersonalization.m

View workflow job for this annotation

GitHub Actions / spm (macos-15, Xcode_16.1, tvOS)

'FirebaseRemoteConfig/FirebaseRemoteConfig-Swift.h' file not found
#import "FirebaseRemoteConfig/Sources/RCNConfigConstants.h"
#import "FirebaseRemoteConfig/Sources/RCNConfigValue_Internal.h"

@implementation RCNPersonalization

Expand Down
Loading
Loading