I have a mapview with a number of annotations on it , the user has the possibility to search for a specific annotation through a search modal screen . The logic is when the user selects an annotation from the search table the mapview conforms to a protocol in order to select the picked annotation already exists on the map . The above logic works fine on the simulator but when I tried on a real device the mapview is unable to select the annotation similarly it gives an error "ERROR: Trying to select an annotation which has not been added"
-(void)OrangePointsViewController:(OrangePointsViewController*)sender annotationForLocation:(NSDictionary *)location{
CLLocationCoordinate2D userLoc;
userLoc.latitude = [[location objectForKey:ORANGE_POINT_LATITUDE] doubleValue];
userLoc.longitude = [[location objectForKey:ORANGE_POINT_LONGITUDE] doubleValue];
[self.mapView setRegion:MKCoordinateRegionMakeWithDistance(userLoc, 1000, 1000) animated:YES];
[self.mapView selectAnnotation:[OrangePointAnnotation annotationForOrangePoint:location] animated:YES];
}