mirror of
https://github.com/TelegramMessenger/Telegram-iOS.git
synced 2026-07-06 03:33:41 +02:00
Bump min iOS version to 11.0
This commit is contained in:
parent
11e11668e6
commit
a14cd136c3
49 changed files with 378 additions and 329 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue