0

I'm using CLGeoCoder for forward geocoding. Its working fine in in devices having OS > 5.0. But the app is crashing is devices having OS < 5.0. As CLGeoCoder is introduced in 5.0, I added a condition as below.

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 

2 Answers 2

2

CLGeoCoder isn'nt available in iOS earlier than iOS 5.0. If you really want to use iOS < 5.0, there's an earlier geocoder, MKReverseGeocoder. However, I suggest that you switch to iOS 5.0 or later versions, instead and use CLGeocoder. Here's a reference to geocoding guide Geocoding Location.

Hope that helps!

1
  • Thanks Kimpoy. MKReverseGeoCoder is for reverse geocoding only, it won't provide forward geocoding.
    – nkongara
    Sep 6, 2012 at 11:00
1

There's a plenty of private classes and i think there's a problem with the NSClassFromString check being insufficient for that particular class, check if the result is positive for iOs below 5.0 nad if so you'll have to find additional conditions. I'd look into the newest methods that are most likely developed specially for iOs 5 public interface and therefore not available at older framework.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.