title: CLLocation Prompt shows and disappears in one moment
body: <p>In my app I try to get longitude and latitude from GPS. To do that I have to ask user about permission to access to his location. Before I do that I add to <code>Info.plist</code> this two rulees: <code>Privacy - Location When In Use Usage Description</code> and <code>Privacy - Location Always Usage Description</code>, then in <code>AppDelegate</code> I ask about permission doing it (SWIFT 3.0):</p>
  
  <pre><code>if CLLocationManager.locationServicesEnabled() == true {
          let localisationManager = CLLocationManager()
          localisationManager.requestWhenInUseAuthorization()
          localisationManager.startUpdatingLocation()
      }
  </code></pre>
  
  <p>I can see <code>UIAlertController</code> for one moment while running the app, but almost in this same time it disappears and I have no time to tap <code>Allow</code> and I can't use GPS. How to fix it?</p>
  
  <blockquote>
    <p>Working solution of my problem:</p>
  </blockquote>
  
  <p>I created separate variables <code>var locationManager = CLLocationManager()</code> in <code>class LocationManager and then I used it in function.</code></p>