@@ -1258,11 +1258,7 @@ class ViewController: UIViewController, UIGestureRecognizerDelegate {
12581258 let alertController = UIAlertController ( title: NSLocalizedString ( " LOCATION_SERVICES_DISABLED " , comment: " no comment " ) , message: NSLocalizedString ( " ENABLE_LOCATION_SERVICES " , comment: " no comment " ) , preferredStyle: . alert)
12591259 let settingsAction = UIAlertAction ( title: NSLocalizedString ( " SETTINGS " , comment: " no comment " ) , style: . default) { _ in
12601260 if let url = URL ( string: UIApplication . openSettingsURLString) {
1261- if #available( iOS 10 , * ) {
1262- UIApplication . shared. open ( url)
1263- } else {
1264- UIApplication . shared. openURL ( url)
1265- }
1261+ UIApplication . shared. open ( url)
12661262 }
12671263 }
12681264 let cancelAction = UIAlertAction ( title: NSLocalizedString ( " CANCEL " , comment: " no comment " ) , style: . cancel) { _ in }
@@ -1286,16 +1282,12 @@ class ViewController: UIViewController, UIGestureRecognizerDelegate {
12861282 message: NSLocalizedString ( " ALLOW_LOCATION " , comment: " no comment " ) ,
12871283 preferredStyle: . alert)
12881284 let settingsAction = UIAlertAction ( title: NSLocalizedString ( " SETTINGS " , comment: " no comment " ) ,
1289- style: . default) { _ in
1290- if let url = URL ( string: UIApplication . openSettingsURLString) {
1291- if #available( iOS 10 , * ) {
1292- UIApplication . shared. open ( url)
1293- } else {
1294- UIApplication . shared. openURL ( url)
1295- }
1296- }
1297- }
1298- let cancelAction = UIAlertAction ( title: NSLocalizedString ( " CANCEL " ,
1285+ style: . default) { _ in
1286+ if let url = URL ( string: UIApplication . openSettingsURLString) {
1287+ UIApplication . shared. open ( url)
1288+ }
1289+ }
1290+ let cancelAction = UIAlertAction ( title: NSLocalizedString ( " CANCEL " ,
12991291 comment: " no comment " ) ,
13001292 style: . cancel) { _ in }
13011293
0 commit comments