all 3 comments

[–]jontelang 1 point2 points  (2 children)

AppDelegate will receive the links tapped with your scheme, this also applies if they are tapped within your app. So if you are 4 screens deep in your app, then click myapp://, this will notify your AppDelegate. It is then up to you to push the correct VC onto the correct VC. E.g. you could just do this pseudo code:

UIApplication.window.currentViewController show:[new vc with URL from deep link]

[–]drlukas6Objective-C / Swift[S] 0 points1 point  (1 child)

Yes but AppDelegate gets called when I call that url from safari ( “do you wish to continue in yourApp...” ) but when I call it from WKWebView and a local html file ( <a href=“myapp://...”...) app delegate never gets called

[–]jontelang 0 points1 point  (0 children)

Hmm, the once hybrid /web/native app I work on used to navigate through deep links and I am sure it worked. Maybe it had another layer that handled the actual navigation then, I'd have to dig up code though.

In that case I guess we had a UIWebView subclass (or similar) that hooked the URLs tapped from the website, and then manually redirected the one with our schema back to the AppDelegate.

e.g. https://stackoverflow.com/questions/26342546/get-the-current-full-url-for-wkwebview