mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 14:20:20 +00:00
Bump min iOS version to 11.0
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import Foundation
|
||||
import Contacts
|
||||
import CoreLocation
|
||||
import SwiftSignalKit
|
||||
|
||||
@@ -15,10 +16,10 @@ public func geocodeLocation(address: String) -> Signal<[CLPlacemark]?, NoError>
|
||||
}
|
||||
}
|
||||
|
||||
public func geocodeLocation(dictionary: [String: String]) -> Signal<(Double, Double)?, NoError> {
|
||||
public func geocodeLocation(address: CNPostalAddress) -> Signal<(Double, Double)?, NoError> {
|
||||
return Signal { subscriber in
|
||||
let geocoder = CLGeocoder()
|
||||
geocoder.geocodeAddressDictionary(dictionary, completionHandler: { placemarks, _ in
|
||||
geocoder.geocodePostalAddress(address, completionHandler: { placemarks, _ in
|
||||
if let location = placemarks?.first?.location {
|
||||
subscriber.putNext((location.coordinate.latitude, location.coordinate.longitude))
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user