I want to open Google search page for a given query using swift. Here is my code that opens the google web page on my default browser but i need it to open search results for a given query. How to go about it? I am new to swift.
if let url = URL(string: "https://www.google.com"), NSWorkspace.shared.open(url) {
print("default browser was successfully opened")
}