Closed c100k closed 8 months ago
@c100k You can't do that without a dedicated deeplink (at least in in-app browsers)
Ah ! Indeed : https://stackoverflow.com/questions/42192701/detect-url-change-in-sfsafariviewcontroller
Closing then. Thanks for your quick reply.
Why it is needed?
From the docs :
This works well when we manage the server behind the webpage being opened, but not when it's a third party website.
For example, in an "OAuth dance", the third party will redirect to the redirect URL we defined when declaring the application on their side. Some of them do not allow to put a deeplink there, forcing an HTTP URL. Which makes it impossible to have the
onClose
callback called with the deeplink. I can link my mobile app present in the stores to illustrate if need be.Possible implementation
One of the solutions I imagined is to have an
onRedirect
callback, having the same signature asonClose
. This way, on the mobile app side, we could listen to the URL changes and mimick theonClose
callback when needed.Code sample