mapbox / mapbox/mapbox-navigation-ios

Make NavigationViewController.mapViewController non-optional

Open
#1,974 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

op-ex
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.