this is my code.getting this EXC_BAD_ACCESS(code=EXC_i386_GPFLT).I don\'n know how to find and solve plz help me ...application getting crash when get longitude
This response you are getting :"http://maps.googleapis.com/maps/api/geocode/json?address=Hyderabad,india"
You can fetch like below:
Here jsondict is your respnse from api
NSArray *results = [jsonDict objectForKey:@"results"];
NSDictionary *geometry = [[results objectAtIndex:0] valueForKey:@"geometry"];
NSArray *location = [geometry objectForKey:@"location"];
float lat = [[location valueForKey:@"lat"] floatValue];
float lng = [[location valueForKey:@"lng"] floatValue];