CLPlacemark formatting issue in iOS 9

Originator:an00na
Number:rdar://21570819 Date Originated:26-Jun-2015 03:38 PM
Status:Open Resolved:
Product:iOS SDK Product Version:iOS 9 beta 2
Classification:Other Bug Reproducible:Always
 
Before iOS 9 I use:
ABCreateStringWithAddressDictionary(CLPlacemark.addressDictionary, NO)

But in iOS 9 ABCreateStringWithAddressDictionary is deprecated. The Xcode warning tells me to use CNPostalAddressFormatter instead. However, CNPostalAddressFormatter can only format CNPostalAddress but there is no way to properly convert CLPlacemark to CNPostalAddress: only these 3 properties are shared by CLPlacemark and CNPostalAddress: country, ISOcountryCode, postalCode.

Sample code:
http://cl.ly/0I0l1q1H3U2R

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!