2

I'm using Xcode 6 beta (6A215l). I've referred this question and updated my code to:

  • use NSLocationWhenInUseUsageDescription in the .plist file,
  • call requestWhenInUseAuthorization in the source code

but neither didUpdateLocations: nor didFailWithError: was called. If I use NSLocationAlwaysUsageDescription and requestAlwaysAuthorization, my app works.

Does anyone have the same problem? I wonder if I should try with Xcode 6 beta 2..

Community
  • 1
  • 1
Tristian
  • 192
  • 1
  • 10
  • possible duplicate of [iOS 8 : Location Services not working](http://stackoverflow.com/questions/24062509/ios-8-location-services-not-working) – killswitch Jul 03 '14 at 13:51
  • @killswitch : I read that question already before posting my question – Tristian Jul 04 '14 at 08:30

1 Answers1

2

In fact, if you want to use the requestWhenInUseAuthorization in your app and gets the didUpdateLocations: and didFailWithError: delegate methods to be called, you need to set in your .plist file BOTH NSLocationAlwaysUsageDescription and NSLocationWhenInUseUsageDescription keys, to make it work. Theses texts will then be displayed in the Settings/Privacy/Location Services/App section of your device.

cdescours
  • 6,004
  • 3
  • 24
  • 30