7

I have a webview based application and when I access http://maps.google.com, my webview is not passing the location as Safari does. I know CLLocationManager is needed, but do I get a callback when a webpage (maps.google.com) wants access to my device location? How do I respond back with the coordinates to the webpage from my WebView?

Aster Veigas
  • 866
  • 3
  • 13
  • 34

1 Answers1

20

The webview will start monitoring the location automatically, however since iOS 8 location access requires the NSLocationWhenInUseUsageDescription description in your info plist to be set.

If this has been done, it will prompt the user automatically to allow location access.

Tim Bodeit
  • 9,673
  • 3
  • 27
  • 57
  • Sorry about that Tim. Don't really remember the entries in the plist. It's been some time now. I remember I had 2 entires in the plist. Nevertheless, accepted your answer ;) – Aster Veigas Jan 17 '15 at 17:26
  • @TimBodeit: Should NSLocationWhenInUseUsageDescription do the trick for Xamarin WebView? Actually I tried, but not luck.. – CharithJ Jul 28 '17 at 04:33