Skip to content
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 RouteController.routeProgress to Objective-C #1323

Merged
merged 3 commits into from
Apr 23, 2018

Conversation

frederoni
Copy link
Contributor

Fixes #1320 Make it possible to update route from Objective-C

@mapbox/navigation-ios 👀

Copy link
Contributor

@1ec5 1ec5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is worth a changelog entry. 👍

@@ -185,7 +185,7 @@ open class RouteController: NSObject {
/**
Details about the user’s progress along the current route, leg, and step.
*/
public var routeProgress: RouteProgress {
@objc public var routeProgress: RouteProgress {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Besides exposing the property to Objective-C, this change also switches the property’s getter and setter to use Objective-C method dispatch. The willSet and didSet should continue to work just like before, but it’s worth double-checking to be sure.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

4f21e5a verifies that the notification in the property’s didSet gets fired.

@frederoni frederoni merged commit 27cfd66 into master Apr 23, 2018
@frederoni frederoni deleted the fred/bridge-routeprog branch April 23, 2018 10:58
@tester87
Copy link

Hi Frederoni, sorry to ask stupid question. Which mean that now I need to update my CocoaPods
Podfile and try to apply sample code as per #1320?

@frederoni
Copy link
Contributor Author

@tester87 correct, that fix is included in v0.17.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants