iOS - 来自网络浏览器的链接会在 iOS 应用程序中打开一个应用程序,尽管它应该重定向到网络浏览器 [英] iOS - Link from web browser opens an app in iOS app although it should be redirected to web browser
问题描述
有一个 iOS 应用.
网上有一个链接:<a href="https://somedomain.com/forgotPassword?key=<some_hash>"
在 iOS 应用中,有一个 apple-app-site-association
文件和 config
<代码>{应用链接":{应用程序":[],详情":[{appID":....",路径":[NOT/forgotPassword",*"]},{appID":....",路径":[NOT/forgotPassword",*"]}]}}
但是重定向是从网络上的那个链接到 iOS 应用程序的,尽管这是在配置中:NOT/forgotPassword"
和重定向到 iOS 应用程序应该被拦截和阻止.>
(我按照以下说明操作:如何在 iOS 应用程序中支持通用链接并为其设置服务器? )
我尝试了 "paths": ["NOT/forgotPassword", "*"]
以及 "paths": ["*", ";不是/forgotPassword"]
我如何配置它以便在浏览器中打开链接将被重定向到 iOS 应用程序(这部分正在工作),除非客户端调用 https://somedomain.com/forgotPassword...
旁注:这部分:在浏览器中打开链接将被重定向到 IOS 应用程序 - 当我有 "paths": ["*"]
时工作正常并且仍然正常工作但是当我引入 NOT 子句时,正如我在上面提供的堆栈溢出链接中所建议的那样,这不起作用.我应该以其他方式格式化吗?
附言我是一名网络开发者,所以如果有 iOS 部分需要采取的步骤,请尽可能简洁和详细,以便我可以转发给 iOS 团队.
同时,我也尝试了这些组合:
路径":[*",不是/forgotPassword?key=?"]路径":[NOT/forgotPassword?key=?", *"]
当移动团队构建一个新的应用程序时,这个问题得到了解决.我在 IIS 中重新配置 apple-app-site-association 文件和回收池时,他们一直在重试.
但是,他们需要重建他们的应用程序才能使其正常工作.
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=?", "*"]
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.
这篇关于iOS - 来自网络浏览器的链接会在 iOS 应用程序中打开一个应用程序,尽管它应该重定向到网络浏览器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!