how can I share iOS URl Schema with parameter to be a link that I can click not just string

Viewed 610
tazah://posts?postID=10 

I need to make this a clickable link without using http

2 Answers

You can open urls using this code

UIApplication.shared.open(url, options: [:], completionHandler: nil)

So in your case:

if let url = URL(string: "tazah://posts?postID=10") {
        if UIApplication.shared.canOpenURL(url) {
            UIApplication.shared.open(url, options: [:], completionHandler: nil)
        }
    }
Related