Home > database >  Open another app with url scheme containing 3 items swift
Open another app with url scheme containing 3 items swift

Time:11-08

I want to open another app installed on my iPhone through the app url scheme, I got the url scheme by exporting the app's ipa enter image description here

@IBAction func openApp(_ sender: Any) {
    
    if let url = URL(string: "avaya://") {
        if UIApplication.shared.canOpenURL(url) {
            UIApplication.shared.open(url, options: [:])
        }
    }

    
}

CodePudding user response:

You are using wrong property.

The "URL Types" (enter image description here

Essentially, your definition is saying that avaya:// links should open your app but you are not allowed to use them inside the app.

  • Related