React Native (EXPO) 通用链接中的散列标记
Hash mark in universal links in React Native (EXPO)
我对 Deep linking 有疑问。示例 link 我的网络应用程序:https://example.com/#/create-password/:id
在打开此 URI 期间,我的应用程序没有启动。
我的app.json:
"android": {
...
"intentFilters": [
{
"action": "VIEW",
"autoVerify": true,
"data": [
{
"scheme": "https",
"host": "*example.com",
"pathPrefix": "/#/create-password"
}
],
"category": [
"BROWSABLE",
"DEFAULT"
]
}
]
...
}
当我删除散列标记形式 app.json 和 运行 https://example.com/create-password/:id 时,我的本机反应应用程序启动。
你能帮我解决这个问题吗?
您遇到的问题似乎与 Android 而不是 React Native - Intent filter pathPrefix with '#' not working 直接相关。我想你可以使用 pathPattern
而不是 pathPrefix
.
来解决这个问题
我对 Deep linking 有疑问。示例 link 我的网络应用程序:https://example.com/#/create-password/:id 在打开此 URI 期间,我的应用程序没有启动。
我的app.json:
"android": {
...
"intentFilters": [
{
"action": "VIEW",
"autoVerify": true,
"data": [
{
"scheme": "https",
"host": "*example.com",
"pathPrefix": "/#/create-password"
}
],
"category": [
"BROWSABLE",
"DEFAULT"
]
}
]
...
}
当我删除散列标记形式 app.json 和 运行 https://example.com/create-password/:id 时,我的本机反应应用程序启动。 你能帮我解决这个问题吗?
您遇到的问题似乎与 Android 而不是 React Native - Intent filter pathPrefix with '#' not working 直接相关。我想你可以使用 pathPattern
而不是 pathPrefix
.