iOS - Link from web browser opens an app in iOS app although it should be redirected to web browser

放肆的年华 提交于 2021-02-11 14:28:10

问题


There is an iOS app.

There is a link on a web: <a href="https://somedomain.com/forgotPassword?key=<some_hash>"

In iOS app, there is an apple-app-site-association file with config

{
  "applinks": {
    "apps": [],
    "details": [
      {
         "appID": "....",
         "paths": ["NOT /forgotPassword", "*"]
      },
      {
         "appID": "....",
         "paths": ["NOT /forgotPassword", "*"]
      }
    ]
  }
}

but the redirection happens from that link on a web to the iOS app, although this is in configuration: "NOT /forgotPassword" and redirection to iOS app should be intercepted and blocked.

( I followed instructions from: How to support Universal Links in iOS App and setup server for it? )

I tried "paths": ["NOT /forgotPassword", "*"] as well as "paths": ["*", "NOT /forgotPassword"]

How do I configure it so opening links in browser would be redirected to iOS app (this part is working), EXCEPT when client calls https://somedomain.com/forgotPassword...

Sidenote: This part: opening links in browser would be redirected to IOS app - was working fine and still works fine when I had "paths": ["*"] but when I introduced NOT clause, as is suggested in the stack overflow link above that I provided, this doesn't work. Should I format it in some other way?

P.S. I'm a web developer, so if there are steps to be taken on iOS part, please be as concise and detailed as possible so I can forward it to iOS team.

EDIT: In the meantime, I also tried these combinations:

"paths": ["*", "NOT /forgotPassword?key=?"]
"paths": ["NOT /forgotPassword?key=?", "*"]

回答1:


The problem was solved when mobile team built a new app. All the time they were just retrying while I was reconfiguring apple-app-site-association file and recycling pool in IIS.

However, they needed to rebuild their app in order for this to work.



来源:https://stackoverflow.com/questions/65489455/ios-link-from-web-browser-opens-an-app-in-ios-app-although-it-should-be-redire

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!