title: Checking user location permission status on iOS 14
body: <p>So I wanted to check if I have access to the user location on iOS14 or not &amp; I found this code but XCode(12) yells at me with this:</p>
  <pre><code>'authorizationStatus()' was deprecated in iOS 14.0
  </code></pre>
  <p>And here is the code:</p>
  <pre><code>func hasLocationPermission() -&gt; Bool {
         var hasPermission = false
         if CLLocationManager.locationServicesEnabled() {
             switch CLLocationManager.authorizationStatus() { // &lt;= 'authorizationStatus()' was deprecated in iOS 14.0
             case .notDetermined, .restricted, .denied:
                 hasPermission = false
             case .authorizedAlways, .authorizedWhenInUse:
                 hasPermission = true
             @unknown default:
                 hasPermission = false
               }
         } else {
              hasPermission = false
         }
          return hasPermission
  }
  </code></pre>
  <p>So what should I use instead?</p>