Stabilize beta release with warning cleanup and edge-case fixes
This commit is contained in:
@@ -225,18 +225,13 @@ actor POISearchService {
|
||||
return pois
|
||||
}
|
||||
|
||||
@available(iOS, deprecated: 26.0, message: "Uses placemark for address formatting")
|
||||
private func formatAddress(_ item: MKMapItem) -> String? {
|
||||
var components: [String] = []
|
||||
|
||||
if let subThoroughfare = item.placemark.subThoroughfare {
|
||||
components.append(subThoroughfare)
|
||||
if let shortAddress = item.address?.shortAddress, !shortAddress.isEmpty {
|
||||
return shortAddress
|
||||
}
|
||||
if let thoroughfare = item.placemark.thoroughfare {
|
||||
components.append(thoroughfare)
|
||||
if let fullAddress = item.address?.fullAddress, !fullAddress.isEmpty {
|
||||
return fullAddress
|
||||
}
|
||||
|
||||
guard !components.isEmpty else { return nil }
|
||||
return components.joined(separator: " ")
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user