mapbox / mapbox/MapboxGeocoder.swift
Crash in MapboxGeocoder: nil qualifiedName - Line 485
未关闭
还没有人认领这个 Issue。
- 主要语言
- Swift
- 星标
- 133
- 派生
- 46
- PR 合并指标
- 30 天内没有已合并 PR
描述
Xcode Version : 15.3
iPhone OS: iOS 17.2.1
IPhone Model: iPhone XS Max
MapboxGeocoder Version: ~0.15
MapboxSearch: >= 2.0.0-rc.3, < 2.0
MapboxMaps: ~> 11.3.0
When attempting to reverse geocode using a CLLocationCoordinate2D, it is crashing when force unwrapping "qulifiedName"
let options = ReverseGeocodeOptions(coordinate: point)
let geoCoder = Geocoder(accessToken: <access token>)
geoCoder.geocode(options) { placemarks, attribution, error in
guard let placemark = placemarks?.first else { return }
dump(placemark)
}
MapboxGeocoder/MBPlacemark.swift:485: Fatal error: Unexpectedly found nil while unwrapping an Optional value
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从 MapboxGeocoder/MBPlacemark.swift 第 485 行开始,使用所列出的 iOS、MapboxGeocoder、MapboxSearch 和 MapboxMaps 版本复现 reverse geocoding 示例。跟踪返回的 placemark 的 qualifiedName 为 nil 的原因,并检查现有的 geocoder 测试(如果有)。当 qualifiedName 缺失时,所提供的 reverse geocoding 流程不再崩溃,即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- swift
- 领域
- api, mobile-dev
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100