mapbox / mapbox/mapbox-search-ios
Make the PlaceAutocomplete initializer and its respective children artifacts public
- Dominant language
- Swift
- Stars
- 28
- Forks
- 28
- PR merge metrics
- No merged PRs in 30d
Description
When implementing the MapboxSearch SDK, when creating tests for my ViewModel, I encountered the challenge of creating stubs for the classes exposed in the SDK, such as `PlaceAutocomplete.Suggestion` and `PlaceAutocomplete.Result`.
It's not possible to create stubs because the constructors of these classes are internal and not public.
I can create stubs if I make the library import `@testable`, but this makes the build for testing very slow.
The solution could be something simple, just adding `public` to the constructors of these classes/structs/enums. Or, exposing stub methods through a test artifact in the SDK for us to use.
Would that be possible?
Contributor guide
Research direction
Start by locating the public PlaceAutocomplete type and its Suggestion and Result children in the MapboxSearch iOS SDK. Check how their constructors are declared and review existing tests or test artifacts; done means consumers can create stubs for these exposed types without importing the library with @testable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- mobile-dev
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100