I'm trying to figure out the best way of going about passing a string value to apple maps so that I can search it. I'm working on an application in class that pulls a random string from an array and I want to be able to call apple maps that is already on the device and search whatever string is selected. I've looked up MKLocalSearchRequest and I think that may be the easiest option I'm just not sure how to integrate it with Apple Maps instead of using it with a mapkitview inside of the app. This is a method I found that seems like it could work I'm just not sure how to declare it.
class func openMaps(with mapItems: [MKMapItem],
launchOptions: [String : Any]? = nil) -> Bool