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

React Native安卓/iOS端Chrome无法打开深度链接问题求助

React Native 深度链接在Chrome中无法生效的解决方案

iOS 端 Chrome 问题处理

  • 优先使用 Universal Links:Chrome iOS 对自定义 URL Scheme(如yourapp://)支持有限,需通过 Universal Links 实现跳转。确保:
    1. 域名已配置 HTTPS,且.well-known或根目录下存在apple-app-site-association文件,格式示例:
      {
        "applinks": {
          "apps": [],
          "details": [
            {
              "appID": "你的TeamID.应用BundleID",
              "paths": ["*"]
            }
          ]
        }
      }
      
    2. Xcode 项目的Signing & Capabilities中添加Associated Domains,填入applinks:你的域名。
  • 使用HTTPS格式链接测试:在Chrome中直接打开https://你的域名/深度链接路径,而非自定义Scheme链接。若需从网页触发,可通过页面内链接跳转,避免直接在地址栏输入自定义Scheme。

Android 端 Chrome 问题处理

  • 完善Manifest中的Intent过滤:确保深度链接的intent-filter包含必要属性,示例:
    <intent-filter android:autoVerify="true">
      <action android:name="android.intent.action.VIEW" />
      <category android:name="android.intent.category.DEFAULT" />
      <category android:name="android.intent.category.BROWSABLE" />
      <data
        android:scheme="https"
        android:host="你的域名"
        android:pathPrefix="/深度链接路径" />
    </intent-filter>
    
    其中android:autoVerify="true"是Chrome验证链接的关键配置。
  • 配置数字资产链接:
    1. 创建assetlinks.json文件,替换为你的应用包名和SHA-256签名:
      [
        {
          "relation": ["delegate_permission/common.handle_all_urls"],
          "target": {
            "namespace": "android_app",
            "package_name": "你的应用包名",
            "sha256_cert_fingerprints": ["应用签名的SHA256值"]
          }
        }
      ]
      
    2. 将文件上传到https://你的域名/.well-known/assetlinks.json,确保可直接访问。
  • 清除缓存重试:若配置完成后仍无效,清除Chrome的应用缓存后再次测试HTTPS格式的深度链接。

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.07.04 16:54:58