3

I'm running on IOS8 simulator and counter this problem:
GMSMapView is able to load map but it didn't ask for Location's permission, thus it could not update current user's location. (I did set a custom location, using GPX file)

However, GMSMapView still works fine on IOS 7.1, 7.0 ...
My code is simple, init mapView, add it to controller's view and using KVO myLocation to observer location's change.

What should I do now ?

Pham Hoan
  • 2,107
  • 2
  • 20
  • 34
  • Update your SDK to latest version may be? as there are some changes regarding CLLocation in iOS 8 like http://stackoverflow.com/questions/25844430/xcode-6-gm-cllocationmanager/25844674#25844674 – Bhumit Mehta Sep 19 '14 at 05:08
  • 1
    Check on this http://stackoverflow.com/questions/24062509/ios-8-location-services-not-working – Pokotuz Sep 19 '14 at 11:07

1 Answers1

3

Google Maps SDK v1.8.1 doesn't request the location authorization that is needed in iOS8, so you need to do this in your application.

Use the CLLocationManager's requestWhenInUseAuthorization method, and in the authorization changed delegate, enable location updates in the map view when authorization can be given.

Also, don't forget to add the correct keys in the info.plist to explain to your users why you need their location, as without this the call to requestWhenInUseAuthorization don't do anything.

Jacksonkr
  • 31,583
  • 39
  • 180
  • 284
NigelG
  • 651
  • 4
  • 7