Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Config] Port 'ConfigExperiment' to Swift #14179

Merged
merged 8 commits into from
Dec 5, 2024
Merged
Show file tree
Hide file tree
Changes from 7 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: 2 additions & 0 deletions FirebaseABTesting/Sources/ABTExperimentPayload.m
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@

#import "FirebaseABTesting/Sources/Private/ABTExperimentPayload.h"

#import "FirebaseABTesting/Sources/Public/FirebaseABTesting/FIRExperimentController.h"

static NSString *const kExperimentPayloadKeyExperimentID = @"experimentId";
static NSString *const kExperimentPayloadKeyVariantID = @"variantId";

Expand Down
11 changes: 2 additions & 9 deletions FirebaseABTesting/Sources/Private/ABTExperimentPayload.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,9 @@

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN
#import "FirebaseABTesting/Sources/Public/FirebaseABTesting/FIRExperimentController.h"

/// Policy for handling the case where there's an overflow of experiments for an installation
/// instance.
typedef NS_ENUM(int32_t, ABTExperimentPayloadExperimentOverflowPolicy) {
ABTExperimentPayloadExperimentOverflowPolicyUnrecognizedValue = 999,
ABTExperimentPayloadExperimentOverflowPolicyUnspecified = 0,
ABTExperimentPayloadExperimentOverflowPolicyDiscardOldest = 1,
ABTExperimentPayloadExperimentOverflowPolicyIgnoreNewest = 2,
};
NS_ASSUME_NONNULL_BEGIN

@interface ABTExperimentLite : NSObject
@property(nonatomic, readonly, copy) NSString *experimentId;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,21 @@

#import <Foundation/Foundation.h>

#import "FIRLifecycleEvents.h"

@class ABTExperimentPayload;

// Forward declaration to avoid importing into the module header
typedef NS_ENUM(int32_t, ABTExperimentPayloadExperimentOverflowPolicy);
/// Policy for handling the case where there's an overflow of experiments for an installation
/// instance.
typedef NS_ENUM(int32_t, ABTExperimentPayloadExperimentOverflowPolicy) {
ABTExperimentPayloadExperimentOverflowPolicyUnrecognizedValue = 999,
ABTExperimentPayloadExperimentOverflowPolicyUnspecified = 0,
ABTExperimentPayloadExperimentOverflowPolicyDiscardOldest = 1,
ABTExperimentPayloadExperimentOverflowPolicyIgnoreNewest = 2,
};

NS_ASSUME_NONNULL_BEGIN

@class FIRLifecycleEvents;

/// The default experiment overflow policy, that is to discard the experiment with the oldest start
/// time when users start the experiment on the web console.
extern const ABTExperimentPayloadExperimentOverflowPolicy FIRDefaultExperimentOverflowPolicy;
Expand Down
1 change: 0 additions & 1 deletion FirebaseRemoteConfig/Sources/FIRRemoteConfig.m
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#import "FirebaseRemoteConfig/Sources/Private/RCNConfigFetch.h"
#import "FirebaseRemoteConfig/Sources/Private/RCNConfigSettings.h"
#import "FirebaseRemoteConfig/Sources/RCNConfigConstants.h"
#import "FirebaseRemoteConfig/Sources/RCNConfigExperiment.h"
#import "FirebaseRemoteConfig/Sources/RCNConfigRealtime.h"
#import "FirebaseRemoteConfig/Sources/RCNConfigValue_Internal.h"
#import "FirebaseRemoteConfig/Sources/RCNPersonalization.h"
Expand Down
38 changes: 0 additions & 38 deletions FirebaseRemoteConfig/Sources/RCNConfigExperiment.h

This file was deleted.

202 changes: 0 additions & 202 deletions FirebaseRemoteConfig/Sources/RCNConfigExperiment.m

This file was deleted.

1 change: 0 additions & 1 deletion FirebaseRemoteConfig/Sources/RCNConfigFetch.m
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
#import "FirebaseInstallations/Source/Library/Private/FirebaseInstallationsInternal.h"
#import "FirebaseRemoteConfig/Sources/Private/RCNConfigSettings.h"
#import "FirebaseRemoteConfig/Sources/RCNConfigConstants.h"
#import "FirebaseRemoteConfig/Sources/RCNConfigExperiment.h"

#import "FirebaseRemoteConfig/FirebaseRemoteConfig-Swift.h"

Expand Down
Loading
Loading