mapbox / mapbox/mapbox-navigation-ios
Make NavigationViewController.mapViewController non-optional
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 918
- Forks
- 326
- Avg merge
- 1h 16m
- Merged PRs (30d)
- 3
Description
`NavigationViewController.mapViewController` is optional, forcing the `mapView` property to also be optional, making it more difficult to specify a map view delegate, because the application also has to consider the case there there’s no map view controller. But `NavigationViewController.init(for:options:)` unconditionally sets the `mapViewController` property to a non-nil value. So there’s no need for the properties to be optional.
/cc @mapbox/navigation-ios
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at NavigationViewController.init(for:options:) and inspect the mapViewController and mapView property declarations. Confirm the initializer always establishes the map view controller, then update the optionality consistently and verify the project builds and its existing tests pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- mobile
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100