iOS: Opening a universal link through code
Asked Answered
I

0

8

I'm trying to open universal links of my app programmatically using the below code:

UIApplication.shared.open(url!, options: [.universalLinksOnly : true]) { (success) in
    if(!success){
        print("Not a universal link")
    }
    else{
        print("working!!")
    }
}

But this is always failing for me. I've tested and verified the universal link implementation from deep links in our website and by pasting it in iOS notes app(My app showed up in action sheet while trying to open in notes). So don't see the issue with universal link implementation. Only while opening it using openURL: method as mentioned above, it's not working. Any alternative way to achieve this, and why is openUrl method failing here?

Ieper answered 22/10, 2020 at 13:10 Comment(2)
I see the same issue. Were you able to find a solution?Measurable
Strange... this is working for me.Punch

© 2022 - 2024 — McMap. All rights reserved.