小编Ale*_*uer的帖子

附加到现有链接时缺少Branch.io参数

我试图让它成为用户点击表单中的Branch.io链接 https://a.test-app.link/identifier?foo=bar ,然后被重定向到AppStore下载应用程序.然后应用程序应该能够foo在启动期间获取参数.

为了调试这个,我遵循了这个过程:

  1. 在测试环境下创建链接.
  2. 点按设备上的链接.
  3. 使用Xcode安装应用程序.
  4. 启动应用程序并在启动期间读取参数

    let branch = Branch.getTestInstance()
    branch.setDebug()
    branch.initSessionWithLaunchOptions(launchOptions, andRegisterDeepLinkHandler: { params, error in
        if error == nil {
            // params are the deep linked params associated with the link that the user clicked -> was re-directed to this app
            // params will be empty if no data found
            print(params)
        }
    })
    
    Run Code Online (Sandbox Code Playgroud)

我还在info.plist文件中设置了正确的API令牌.

根据我的理解,我现在应该fooparams字典中获取我的参数,但这不会发生.获取参数的唯一方法是使用仪表板添加静态参数.此外,我甚至在params字典中获取了我已从仪表板中删除的旧参数,但没有URL查询参数的迹象.

有没有人知道我做错了什么?

谢谢

deep-linking ios branch.io

5
推荐指数
1
解决办法
2479
查看次数

标签 统计

branch.io ×1

deep-linking ×1

ios ×1