Skip to content

Commit 1d99846

Browse files
Use descriptionWithLocale instead of description to convert NSNumber to NSString.
1 parent a7ab377 commit 1d99846

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

FirebaseRemoteConfig/Sources/FIRRemoteConfig.m

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,10 @@ - (void)setCustomSignals:(nonnull NSDictionary<NSString *, NSObject *> *)customS
299299
for (NSString *key in customSignals) {
300300
NSObject *value = customSignals[key];
301301
if (![value isKindOfClass:[NSNull class]]) {
302-
NSString *stringValue = [value description];
302+
NSString *stringValue =
303+
[value isKindOfClass:[NSNumber class]]
304+
? [(NSNumber *)value descriptionWithLocale:[NSLocale currentLocale]]
305+
: (NSString *)value;
303306
[newCustomSignals setObject:stringValue forKey:key];
304307
} else {
305308
[newCustomSignals removeObjectForKey:key];

0 commit comments

Comments
 (0)