Search code examples
xamarinxamarin.iosmvvmcross

Mvvmcross Location iOS doesn't work


I'm using mvvmcross location plugin and it's works fine in android. But iOS version doesn't work. When I have installed my app and check Location Service in settings. I setup it to "Always". It's how I start location watcher:

 MvxGeoLocation _location;
 IMvxLocationWatcher _locationWatcher = Mvx.Resolve<IMvxLocationWatcher>();
 _locationWatcher.Start(new MvxLocationOptions(), OnLocation, OnError );

enter image description here

When I start my app and click on start location button - nothing is happening. And then I have checked my location services again:

enter image description here


Solution

  • Ok, I found it. I should add this to my info.plist

    <key>NSLocationAlwaysUsageDescription</key>
    <string>Your message goes here</string>
    <key>NSLocationWhenInUseUsageDescription</key>
    <string>Your message goes here</string>