You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Expo iOS端Firebase动态链接无法获取正确目标URL问题

Expo + Firebase动态链接iOS端异常问题求助

问题现状

我开发了一款Expo应用,采用Firebase动态链接实现“点击链接打开App指定页面”的功能。Android端运行完全正常,但iOS端出现异常:

  • 在Firebase后台创建了URL前缀https://test.page.link,生成的动态链接为https://test.page.link/gY5Z,预期点击该链接后,App会被唤起并跳转至目标URL https://myapp.com/about(对应应用内的关于页面)
  • 我在App.js中通过以下代码获取唤起链接并弹窗展示:
const url = useURL();

useEffect(() => {
  Alert.alert("URL", url);
}, [url]);
  • Android端测试时,弹窗显示的是目标URL https://myapp.com/about,能正常跳转至关于页面;但iOS端点击链接打开App后,弹窗显示的是动态链接本身https://test.page.link/gY5Z,无法获取到真实的目标URL

相关配置详情

Firebase自动生成的apple-app-site-association文件

路径:https://test.page.link/.well-known/apple-app-site-association,内容如下(Team ID和bundleIdentifier已与app.json保持一致):

{
  "applinks":
  {
    "apps":[],
    "details":
    [
      {
        "appID":"<TeamID>.<bundleIdentifier>",
        "paths":["NOT /_/*","/*"]
      }
    ]
  }
}

app.json中的iOS配置片段

"ios": {
  "icon": "./assets/launch-icon-ios.png",
  "supportsTablet": true,
  "bundleIdentifier": "<bundleIdentifier>",
  "infoPlist": {
    "NSRemindersUsageDescription": "This app uses the calendar"
  },
  "config": {
    "googleMapsApiKey": "<Google maps api key>"
  },
  "associatedDomains": ["applinks:test.page.link"]
},

额外配置说明

  • 应用使用eas build进行构建
  • app.json中expo.scheme设置为https:"expo": {"scheme": "https"}

求助方向

我怀疑问题出在apple-app-site-association文件配置或app.json的associatedDomains设置上,但无法定位具体原因,希望能得到可行的解决方案。

内容的提问来源于stack exchange,提问作者kablash

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.15 18:31:05