-
Notifications
You must be signed in to change notification settings - Fork 322
Route progress classes should be codable #1940
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
Comments
Once we move the progress classes off NSObject (#2294), it’ll be straightforward to implement Codable conformance in these classes. This will make it much easier for developers to implement state restoration. |
mapbox-navigation-ios/MapboxCoreNavigation/EventDetails.swift Lines 298 to 329 in 134af22
But this implementation does not seem to be exactly what is expected, because it does not directly encodes it's variables and instead encodes sub-sub properties. I thought that it is intended to be used for passing as context info for some Events, but I could not find any real usage. |
Blocked by #2352 |
Posterity: Regarding this comment, as long as route-step is encodable, |
Closing per sprint planning convo. |
Sorry, I got some wires crossed in sprint planning. This change is still relevant but doesn’t need to happen for v1.0.0.
Looks like this implementation was introduced in 66cb213 for #1533 but ended up being unused after 982a94c in the same PR. We can safely remove that implementation and replace it with a more standard one that directly encodes its members. |
RouteProgress, RouteLegProgress, and RouteStepProgress should conform to NSSecureCoding or Codable. MapboxDirections.swift classes such as Route are already NSSecureCoding-conformant.
/cc @mapbox/navigation-ios
The text was updated successfully, but these errors were encountered: