CLLocationManager requestWhenInUseAuthorization does not call CLLocationManagerDelegate's locationManager:didUpdateLocations
| Originator: | greg | ||
| Number: | rdar://17190441 | Date Originated: | 06/05/2014 |
| Status: | Open | Resolved: | |
| Product: | iOS SDK | Product Version: | 8.0 (12A4265u) |
| Classification: | Serious Bug | Reproducible: | Always |
Summary: Apps that requestWhenInUseAuthorization do not have CLLocationManagerDelegate methods called. requestAlwaysAuthorization works as expected. Steps to Reproduce: (Sample app attached) 1. Setup CLLocationManager, delegate, and Info.plist strings 2. Add NSLogs in the required delegate methods, and also include locationManager:didUpdateLocations:. 2. [locationManager requestWhenInUseAuthorization] 3. In the didChangeAuthorizationStatus, call [manager startUpdatingLocation] when status == kCLAuthorizationStatusAuthorizedWhenInUse 4. Observe NSLogs in console Expected Results: First run: Authorization not determined Authorization when in use Updated location Actual Results: Authorization not determined Authorization when in use Version: 8.0 (12A4265u) Notes: Sample project attached. Code in ViewController.m. You can swap out requestWhenInUseAuthorizationn for requestAlwaysAuthorization and it will work fine, just delete the sample app in between. Configuration: iPhone Simulator Attachments: 'SampleProject.zip' was successfully uploaded.
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!