-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a0fcb67
commit d40694f
Showing
10 changed files
with
122 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// | ||
// File.swift | ||
// | ||
// | ||
// Created by Themis Wang on 2023-11-16. | ||
// | ||
|
||
import Foundation | ||
|
||
@objc(FIRRemoteConfigInterop) | ||
public protocol RemoteConfigInterop { | ||
func registerRolloutsStateSubscriber(_ namespace: String, | ||
subscriber: RolloutsStateSubscriber?) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
// | ||
// File.swift | ||
// | ||
// | ||
// Created by Themis Wang on 2023-11-16. | ||
// | ||
|
||
import Foundation | ||
|
||
@objc(FIRRolloutAssignment) | ||
public class RolloutAssignment: NSObject { | ||
@objc public var rolloutId: String | ||
@objc public var variantId: String | ||
@objc public var templateVersion: String | ||
@objc public var parameterKey: String | ||
@objc public var parameterValue: String | ||
|
||
public init(rolloutId: String, variantId: String, templateVersion: String, parameterKey: String, | ||
parameterValue: String) { | ||
self.rolloutId = rolloutId | ||
self.variantId = variantId | ||
self.templateVersion = templateVersion | ||
self.parameterKey = parameterKey | ||
self.parameterValue = parameterValue | ||
super.init() | ||
} | ||
} | ||
|
||
@objc(FIRRolloutsState) | ||
public class RolloutsState: NSObject { | ||
@objc public var assignments: Set<RolloutAssignment> = Set() | ||
|
||
public init(assignmentList: [RolloutAssignment]) { | ||
for assignment in assignmentList { | ||
assignments.insert(assignment) | ||
} | ||
super.init() | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
FirebaseRemoteConfig/Interop/RolloutsStateSubscriber.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// | ||
// File.swift | ||
// | ||
// | ||
// Created by Themis Wang on 2023-11-16. | ||
// | ||
|
||
import Foundation | ||
|
||
@objc(FIRRolloutsStateSubscriber) | ||
public protocol RolloutsStateSubscriber { | ||
func onRolloutsStateChanged(_ rolloutsState: RolloutsState) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters