我试图让它成为用户点击表单中的Branch.io链接
https://a.test-app.link/identifier?foo=bar
,然后被重定向到AppStore下载应用程序.然后应用程序应该能够foo
在启动期间获取参数.
为了调试这个,我遵循了这个过程:
启动应用程序并在启动期间读取参数
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令牌.
根据我的理解,我现在应该foo
在params
字典中获取我的参数,但这不会发生.获取参数的唯一方法是使用仪表板添加静态参数.此外,我甚至在params
字典中获取了我已从仪表板中删除的旧参数,但没有URL查询参数的迹象.
有没有人知道我做错了什么?
谢谢