aka MKLocalSearch.Request in Swift.
Today my users reported that our address auto-complete functionality was returning strange results. We narrowed the issue down to pointOfInterestFilter being set. Sample code below:
MKLocalSearchRequest *request = [[MKLocalSearchRequest alloc] init];
request.region = self.region;
request.naturalLanguageQuery = addressString;
request.resultTypes = MKLocalSearchResultTypeAddress;
request.pointOfInterestFilter = [MKPointOfInterestFilter filterIncludingAllCategories];
That last line is the problem. When I stopped setting request.pointOfInterestFilter the MKLocalSearch started working as it always had.
To further hammer home the point, with request.pointOfInterestFilter unset I set resultTypes to MKLocalSearchCompleterResultTypePointOfInterest (aka .pointOfInterest) and the issue returned.
It seems Apple made a change on their backend recently such that pointOfInterestFilter now overrides resultTypes.