I\'ve been doing some research about CoreLocation. Recently, I encountered a problem that has been covered elsewhere, but in Objective C, and for iOS 8.
I feel kinda
It is just a 2 line function in Swift 4:
import CoreLocation static func isLocationPermissionGranted() -> Bool { guard CLLocationManager.locationServicesEnabled() else { return false } return [.authorizedAlways, .authorizedWhenInUse].contains(CLLocationManager.authorizationStatus()) }