CLLocationmanager 在约 30 秒后抛出
Posted
技术标签:
【中文标题】CLLocationmanager 在约 30 秒后抛出【英文标题】:CLLocation manager throws after ~30seconds 【发布时间】:2010-09-22 04:52:48 【问题描述】:@起初我以为它没有开火,但看到this
所以我等待,现在我得到了未处理的异常:MonoTouch.Foundation.You_Should_Not_Call_base_In_This_Method:抛出了“MonoTouch.Foundation.You_Should_Not_Call_base_In_This_Method”类型的异常。在失败的处理程序中。
我已经定义了一个 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,几天前刚刚安装了一个 coupla。有什么建议吗?
问候
_埃里克
【问题讨论】:
【参考方案1】:例外是说您不应该在覆盖的“失败”方法中调用 base.Failed。
【讨论】:
我不确定。我还在用 4.0.1 只是补充一下,它仍然失败,我需要打开机场,即使我有强硬路线以上是关于CLLocationmanager 在约 30 秒后抛出的主要内容,如果未能解决你的问题,请参考以下文章
CoreLocation CLLocationManager requestLocation 需要 10 秒才能得到回调
CLLocationManager 获取位置很慢,Swift
CLLocationManager 从后台状态返回时冻结我的应用程序?