MKLocalPointsOfInterestRequest always failed.

Searching for nearby POIs using MKLocalPointsOfInterestRequest has been unsuccessful with error Error Domain=MKErrorDomain Code=5 "(null)" UserInfo={MKErrorGEOError=-10}. Is there any solution?

Encountered the same problem。

        let testLocation = CLLocation(latitude: 39.7282754913204, longitude: -121.83680282031702)
        let request = MKLocalPointsOfInterestRequest(center: testLocation.coordinate, radius: 100)
        request.pointOfInterestFilter = .init(including: [.cafe])
        let search = MKLocalSearch(request: request)
        do {
            let response = try await search.start()
            results = response.mapItems
        } catch let error {
            searchLogging.error("Search error: \(error.localizedDescription)")
            results = []
        }

Error Message:

SpatialPlaceLookup ticket submission failed. Too many parameters: 1 max allowed: 0
Search error: The operation couldn’t be completed. (MKErrorDomain error 5.)
code-block
MKLocalPointsOfInterestRequest always failed.
 
 
Q