-
Notifications
You must be signed in to change notification settings - Fork 333
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
iOS Segment.io SDK does not allow null
in Event's properties
#852
Comments
Switched the underlying storage from plist to json. Null's are now coming across correctly. PR to be attached shortly. |
@bsneed, wait for the pull-request. Thanks! |
Fixed, but leaving this open until we roll out another release soon. |
Released in 3.8.0-beta.1 |
colinking
added a commit
to segmentio/typewriter
that referenced
this issue
Apr 5, 2020
`analytics-ios` recently released support for serializing `null` values in the request sent to the Segment Tracking API: segmentio/analytics-ios#852 This was released as `v3.8.0-beta.1`. For folks using typewriter + `analytics-ios` of at least that version, null values for required fields will now be serialized. Optional fields set to `nil` continue to be removed before serialization. Fixes #114
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We use the SDK to send analytics on Segment.io by calling
[SEGAnalytics - (void)track:(NSString *)event properties:(SERIALIZABLE_DICT _Nullable)properties]
method. This method usesSEGCoerceJSONObject
method to serialize properties in JSON and during the serialization, it drops all the NSNull values.Because of this we cannot send as a
properties
a dictionary with the value for key equals null, for example{ "name": null }
Android's implementation of Segment.io SDK ALLOWS sending null values.
In the comment of SEGCoerceJSONObject method it says that dropping NSNull is a HOTFIX
// Hotfix for issue where SEGFileStorage uses plist which does NOT support NSNull
This "HOTFIX" was added more than 2 years ago in the pr #707
Could you please provide normal fix for the issue and stop dropping NSNull values?
The iOS SDK is inconsistent with Android one and behave differently.
Thanks!
The text was updated successfully, but these errors were encountered: