I am developing an application based on geocoder. I am using the placemark address dictionary method inside the geocoder delegate method. I'm able to get all the details (street, city, state, county, countrycode and all) except postalcode for India. Why is postal code missing? Any suggestions are appreciated
My code:
-(void)locationUpdate:(CLLocation *)location
{
currentLocation= [location coordinate];
if (currentLocation.latitude!=checking.latitude)
{
NSDate *currentTime =[NSDate date];
fireTime = currentTime;
checking.latitude=currentLocation.latitude;
checking.longitude=currentLocation.longitude;
}
MKReverseGeocoder *geocoder = [[MKReverseGeocoder alloc] initWithCoordinate:[location coordinate]];
[geocoder setDelegate:self];
[geocoder start];
}
-(void)reverseGeocoder:(MKReverseGeocoder *)geocoder didFindPlacemark:(MKPlacemark *)placemark
{
NSLog(@"placemark.postalCode ***********%@",placemark.postalCode);
}
I am getting this output as the geocoder has returned:
{
City = Vishakhapatnam;
Country = India;
CountryCode = IN;
FormattedAddressLines = (
NH5,
Vishakhapatnam,
"Andhra Pradesh",
India
);
State = "Andhra Pradesh";
Street = NH5;
Thoroughfare = NH5;
}
placemark.postalCode *********** (null)
Its works fine for other countries but I'm not getting Zip code for India locations. How can I get postal code for India locations also?