AdaSupport / ios-sdk

EmbedFramework is a small iOS SDK that is used to embed the Ada Chat bot into native iOS applications.
MIT License
4 stars 20 forks source link

Detect universal link URL in reply and handle in-app #61

Open dsmailes opened 2 years ago

dsmailes commented 2 years ago

Is there a way to handle when a bot replies with a universal link that can be understood by our app e.g. https://mysite.com/login and capture that with onOpenUrl ?

At the moment I can get the app to recognise that we're using the https scheme and it will send us direct to safari, where I can then tap the universal link banner to get to the screen I wanted in the app, but I'd like to skip that step if possible.

There's a thread here that describes what I'm aiming for: https://stackoverflow.com/questions/35314966/wkwebview-still-not-handling-universal-link

As an alternative, we could provide AdaWebHost with some properties, maybe a Bool to check for and a closure to execute if that condition is met, and thereby avoid running shared.open(url...) in our fork, like this: https://github.com/AdaSupport/ios-sdk/commit/9d50ca44154d2d4bd479b33ab0529edfdfd236be