Mvvmcross位置iOS不起作用

时间:2016-05-06 08:03:12

标签: xamarin xamarin.ios mvvmcross

我正在使用mvvmcross location插件,它在android中工作正常。但iOS版本不起作用。当我安装了我的应用程序并在设置中检查位置服务。我把它设置为“始终”。这就是我开始观察位置的方式:

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

enter image description here

当我启动我的应用并点击开始位置按钮时 - 什么也没发生。 然后我再次检查了我的位置服务:

enter image description here

1 个答案:

答案 0 :(得分:1)

好的,我找到了。我应该将它添加到我的info.plist

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