-
Notifications
You must be signed in to change notification settings - Fork 88
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
Expose more RouteStep properties to Obj-C #227
Conversation
b2ef8f4
to
7c96d9f
Compare
MapboxDirections/MBRouteStep.swift
Outdated
@@ -669,7 +696,7 @@ open class RouteStep: NSObject, NSSecureCoding { | |||
guard let transportTypeDescription = decoder.decodeObject(of: NSString.self, forKey: "transportType") as String? else { | |||
return nil | |||
} | |||
transportType = TransportType(description: transportTypeDescription) | |||
transportType = TransportType(description: transportTypeDescription)! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should probably be safely unwrapped.
Looks good. It looks like in a few places we're asserting that values are non-optional where as code around either unwraps the value or provides a default fallback. |
d7afc8a
to
a216f43
Compare
cca7437
to
b218ce4
Compare
Hi, When will you release a new MapboxDirections.swift pod which include bridge to ObjC for RouteStep.maneuverX variables ? Cheers |
Fixes #117
maneuverType
,maneuverDirection
, andtransportType
now bridges to Obj-C.Another way to expose these properties to Obj-C could be to add an additional computed non-optional
bridgableManeuverType
if optional chaining syntax is preferred within the framework.@1ec5 @bsudekum 👀