I want to open the Watch app present in the iPhone.
I searched and tried the following url:
Button("Open Watch App") {
if let url = URL(string: "itms-watch://") {
if UIApplication.shared.canOpenURL(url) {
UIApplication.shared.open(url, options: [:], completionHandler: nil)
} else {
// Handle the case where the Watch app is not installed
print("Watch app is not installed.")
}
}
}
But this url is opening App store. What will be the url to open the Watch app.