Xamarin.ios CLLocation manager在约30秒后抛出

Xamarin.ios CLLocation manager在约30秒后抛出,xamarin.ios,core-location,Xamarin.ios,Core Location,@起初我以为它没有开火,但我看到了 >我等待了,现在我得到了未处理的异常:MyTrask.Buffy.YouSuthddNo.CelpBaseBasyIn。在失败的处理程序中 我已经定义了一个CLLocationManager,这里是FinishedLaunching&CLLocationManagerDelegate public override bool FinishedLaunching (UIApplication app, NSDictionary options)

@起初我以为它没有开火,但我看到了

<> >我等待了,现在我得到了未处理的异常:MyTrask.Buffy.YouSuthddNo.CelpBaseBasyIn。在失败的处理程序中

我已经定义了一个CLLocationManager,这里是FinishedLaunching&CLLocationManagerDelegate

public override bool FinishedLaunching (UIApplication app, NSDictionary options)
            {
                // If you have defined a view, add it here:
                // window.AddSubview (navigationController.View);

                _locationManager = new CLLocationManager();
                _locationManager.Delegate = new LocationManagerDelegate(this);
                _locationManager.StartUpdatingLocation();

                window.MakeKeyAndVisible ();


                return true;
            }




private class LocationManagerDelegate : CLLocationManagerDelegate
        {
            private AppDelegate _appd;
            public LocationManagerDelegate(AppDelegate appd)
            {
               _appd = appd;
                 Console.WriteLine("Delegate created");
            }
            public override void UpdatedLocation(CLLocationManager manager
                                                    , CLLocation newLocation, CLLocation oldLocation)
            {
                Console.WriteLine("Lat: " + newLocation.Coordinate.Latitude.ToString());


            }
              public override void Failed (CLLocationManager manager, NSError error)
            {
                //_appd.labelInfo.Text = "Failed to find location";
                Console.WriteLine("Failed to find location");
                base.Failed (manager, error);
            }
        }
我使用的是最新的monodevelop、monotouch、xcode和iphone SDK,几天前刚刚安装。有什么建议吗

问候


_Eric

例外情况是,您不应该调用base.Failed,在重写的“Failed”方法中失败。

对此我不确定。我仍然使用4.0.1只是想补充一点,它仍然失败,我需要打开机场,尽管我有一个强硬路线