2016-05-06 52 views
0

我正在使用mvvmcross位置插件,它在Android中正常工作。但iOS版本不起作用。当我安装我的应用程序并在设置中检查位置服务。我将其设置为“始终”。这就是我如何开始位置的观察者:Mvvmcross位置iOS不工作

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

enter image description here

当我开始我的应用程序,然后点击启动按钮的位置 - 什么也没有发生。 然后我又检查了我的位置服务:

enter image description here

回答

1

好吧,我发现它。我应该把这加到我的info.plist

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