You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The documentation here suggests that any properties passed to track that are Codable will be successfully logged. This isn't fully accurate.
Instead, the properties must be able to be passed to the JSON init method. Further, if that JSON init method throws an error due to type issues with the passed properties, then with debug builds an assert causes a crash.
With our app, I don't want use of Segment to cause a debug crash.
This also is true for screen and identify calls.
To Reproduce
As indicated above.
Expected behavior
I think the docs should better reflect the actual constraints on the property types.
Library users should be given the option about whether they want these debug asserts to cause crashes. E.g., this should be configurable.
Screenshots
N/A
Platform (please complete the following information):
Library Version in use: 1.4.7
Platform being tested: iOS
Additional context
N/A
The text was updated successfully, but these errors were encountered:
They will be successfully logged, provided they're expressible in JSON. You're getting the assert in your debug build because the params you're supplying are NOT expressible in JSON. This assert isn't going to be removed, and we're not going to make it an option. It's there for you to know that you need to fix the parameters or stop sending them because they will not show up in Segment.
The docs you reference show conformance to Codable, which seems to be a pretty strong indicator of what the type requirements are.
Describe the bug
The documentation here suggests that any properties passed to
track
that areCodable
will be successfully logged. This isn't fully accurate.Instead, the properties must be able to be passed to the
JSON
init method. Further, if thatJSON
init method throws an error due to type issues with the passed properties, then with debug builds an assert causes a crash.With our app, I don't want use of Segment to cause a debug crash.
This also is true for screen and identify calls.
To Reproduce
As indicated above.
Expected behavior
Screenshots
N/A
Platform (please complete the following information):
Additional context
N/A
The text was updated successfully, but these errors were encountered: