3

I have an iPhone App (built using XCode 4.4.1 and OS target of IOS 5.1) that performs reverse geocoding using CLGeocoder.

In my App I determine the title (for an annotation on a map) as follows:

    CLPlacemark *placemark = ...;      
    NSString* title = [NSString stringWithFormat:@"%@, %@, %@", placemark.subLocality, placemark.locality, placemark.country]
    ...

When running on an IOS5.x device the result is as expected with the location information increasing in scale from left to right (i.e. Suburb, City, Country).

If I run exactly the same app on an IOS6 device, the values for placemark.subLocality and placemark.locality are reversed resulting in (City, Suburb, Country).

I suspect this is a result of switch from Google Maps to Apple Maps. I am reluctant to conditionally code this based on the IOS version as I suspect the behaviour under IOS6 is incorrect and if so will be corrected in the future.

Has anyone encountered this issue and if so have any advice on the best way to deal with it or am I missing something (I am a relatively new IOS developer)?

SpaceBeers
  • 13,617
  • 6
  • 47
  • 61

1 Answers1

0

Sublocality and locality are swapped in the Reverse GEO response in iOS 6.0, but only for some locations. San Francisco seems to be fine, but Sydney (and other Australian cities) return the values in the wrong order.

RedBlueThing
  • 42,006
  • 17
  • 96
  • 122
  • Thanks for that. This all but confirms it is an IOS6 bug. I'll hang off for a few more days before marking this as answered but it appears to be very unlikely that it is something I'm doing wrong. – Andrew Rutherford Oct 04 '12 at 00:30
  • @AndrewRutherford No problem :) Seems like the bug is still there. Hope Apple will fix it soon. – RedBlueThing Oct 12 '12 at 04:48