File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -70,9 +70,9 @@ public extension RemoteConfig {
7070 /// Sets custom signals for this Remote Config instance.
7171 /// - Parameter customSignals: A dictionary mapping string keys to custom
7272 /// signals to be set for the app instance.
73- func setCustomSignals( _ customSignals: [ String : CustomSignalValue ] ) async throws {
73+ func setCustomSignals( _ customSignals: [ String : CustomSignalValue ? ] ) async throws {
7474 return try await withCheckedThrowingContinuation { continuation in
75- let customSignals = customSignals. mapValues { $0. toNSObject ( ) }
75+ let customSignals = customSignals. mapValues { $0? . toNSObject ( ) ?? NSNull ( ) }
7676 self . __setCustomSignals ( customSignals) { error in
7777 if let error {
7878 continuation. resume ( throwing: error)
Original file line number Diff line number Diff line change @@ -225,12 +225,13 @@ final class FirebaseRemoteConfig_APIBuildTests: XCTestCase {
225225 let _: Void = try config. setDefaults ( from: MyEncodableValue ( ) )
226226
227227 Task {
228- let signals : [ String : CustomSignalValue ] = [
228+ let signals : [ String : CustomSignalValue ? ] = [
229229 " signal_1 " : . integer( 5 ) ,
230230 " signal_2 " : . string( " enable_feature " ) ,
231231 " signal_3 " : 5 ,
232232 " signal_4 " : " enable_feature " ,
233233 " signal_5 " : " enable_feature_ \( " secret " ) " ,
234+ " signal_6 " : nil , // Used to delete the custom signal for a given key.
234235 ]
235236 try await config. setCustomSignals ( signals)
236237 }
You can’t perform that action at this time.
0 commit comments