How do I store exact values for numbers in Firestore from the Objective-C SDK?
For instance, if I manually create an "abv" field with a value of "15.9", it shows that exact value.
However, if I update a value in Firestore from the Objective-C API with an NSNumber
value of @(15.9)
, I get this approximate value in my Firestore document.
NSDictionary *data = @{@"abv": @(15.9)};
[documentReference updateData:data completion:^(NSError * _Nullable error) {
}];
Here's another example. I attempted to store the value 61.99
from my Objective-C app. I can manually edit the amount back to 61.99
from the web console. I do not understand why I can manually input exact decimal values from the web console but not from the Objective-C API.