title: DidUpdateLocation not storing location, userLoc always nil
body: <p>I am trying to simply get the user's current device location and store it in a global variable called userLoc. I have this code to call didUpdateLocation:</p>
  
  <pre><code>self.locationManager.requestLocation()
  print("aaa ", self.userLoc)
  </code></pre>
  
  <p>and this to set the userLoc to the current location:</p>
  
  <pre><code>func locationManager(_ manager: CLLocationManager,
                           didUpdateLocations locations: [CLLocation]) {
          if let location = locations.last {
              self.userLoc = location
          }
      }
  </code></pre>
  
  <p>userLoc is defined like this:</p>
  
  <pre><code>var userLoc: CLLocation?
  </code></pre>
  
  <p>but when I run the app and try to print userLoc, it ALWAYS prints:</p>
  
  <pre><code>aaa nil
  </code></pre>
  
  <p>The <code>Privacy - Location When In Use Usage Description</code> is set in the Info.plist. I honestly dont know what else to try. I've been banging my head against the wall for a while trying to fix this. Any help you could give would be very much appreciate. Thank you. </p>