amay077 / Xamarin.Forms.GoogleMaps

Map library for Xamarin.Forms using Google maps API
https://www.nuget.org/packages/Xamarin.Forms.GoogleMaps/
MIT License
546 stars 349 forks source link

MyLocationButtonEnabled not working on iOS #546

Open viniciusmaia opened 6 years ago

viniciusmaia commented 6 years ago

I enabled MyLocation and MyLocationButton in my project and, for iOS version, the MyLocation Button didn't worked. I tested set IsShowingUser = true for iOS, but didn't worked too.

The same code works for Android like charm, but for iOS, only MyLocationButton doesn't work. The Button is enabled, but when I tap it, nothing happen.

amay077 commented 6 years ago

Do you add location permission settings in info.plist ?

Maybe you should add NSLocationAlwaysUsageDescription and NSLocationWhenInUseUsageDescription.

https://github.com/amay077/Xamarin.Forms.GoogleMaps/blob/0bed5deda86025efdd98c0c54af8f2888543e971/XFGoogleMapSample/iOS/Info.plist#L45-L48

See also: Requesting Always Authorization | Apple Developer Documentation