【问题标题】:CLGeoCoder causing the app to crash?CLGeoCoder 导致应用程序崩溃?
【发布时间】:2012-09-05 22:11:49
【问题描述】:

我正在使用 CLGeoCoder 进行正向地理编码。它在 OS > 5.0 的设备中运行良好。 但应用程序崩溃是操作系统

Class clGeoCoderClass = NSClassFromString(@"CLGeocoder");
if (clGeoCoderClass != nil) {
  //Use CLGeoCoder.
}

I'm getting a crash in devices under OS < 5.0 and crash log shows.
<Notice>: dyld: Symbol not found: _OBJC_CL
<Notice>: ASS_$_CLGeocoder.

How to handle this crash issues and 

【问题讨论】:

    标签: iphone ios ios5 ios4


    【解决方案1】:

    CLGeoCoder 在 iOS 5.0 之前的 iOS 中不可用。如果你真的想使用 iOS Geocoding Location的参考。

    希望有帮助!

    【讨论】:

    • 谢谢金波伊。 MKReverseGeoCoder 仅用于反向地理编码,不提供正向地理编码。
    【解决方案2】:

    有很多私人课程,我认为NSClassFromString 检查对于该特定课程来说是不够的,检查结果对于低于 5.0 nad 的 iO 是否为正,如果是这样,您将不得不找到其他条件。我会研究最有可能专门为 iOs 5 公共接口开发的最新方法,因此在旧框架中不可用。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-10-21
      • 2016-06-04
      • 2011-08-24
      • 2014-05-03
      • 1970-01-01
      • 1970-01-01
      • 2023-04-09
      • 1970-01-01
      相关资源
      最近更新 更多