title: Get iPhone location on loading
body: <p>I have set my app to initially request location as soon as it loads but the first time the app is used the dialog box pops that asks permission from the user appears for a brief second then disappears as the view finished loading (or something). This all happens too quick for the user to say "yep, that's ok". Where should I put the following code to make the location permission popup appear the first time the user loads the app?</p>
  
  <pre><code>CLLocationManager *locationManager = [[CLLocationManager alloc] init];
  CLLocation *location = [[CLLocation alloc] init];
  
  locationManager.desiredAccuracy = kCLLocationAccuracyKilometer;
  [locationManager setPurpose:@"A fun way to record where you've answered the questions and how you did at each location."];
  [locationManager startUpdatingLocation];
  location = [locationManager location];
  [locationManager stopUpdatingLocation];
  </code></pre>
  
  <p>Thank you,
  Bren</p>