Skip to content

Commit

Permalink
Use stringValue to convert NSNumber to NSString
Browse files Browse the repository at this point in the history
  • Loading branch information
tusharkhandelwal8 committed Dec 9, 2024
1 parent 1d99846 commit ec58080
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions FirebaseRemoteConfig/Sources/FIRRemoteConfig.m
Original file line number Diff line number Diff line change
Expand Up @@ -299,10 +299,9 @@ - (void)setCustomSignals:(nonnull NSDictionary<NSString *, NSObject *> *)customS
for (NSString *key in customSignals) {
NSObject *value = customSignals[key];
if (![value isKindOfClass:[NSNull class]]) {
NSString *stringValue =
[value isKindOfClass:[NSNumber class]]
? [(NSNumber *)value descriptionWithLocale:[NSLocale currentLocale]]
: (NSString *)value;
NSString *stringValue = [value isKindOfClass:[NSNumber class]]
? [(NSNumber *)value stringValue]
: (NSString *)value;
[newCustomSignals setObject:stringValue forKey:key];
} else {
[newCustomSignals removeObjectForKey:key];
Expand Down

0 comments on commit ec58080

Please sign in to comment.