我在Branch IO dashboard中注册了两个不同的iOS / Unity应用程序(应用程序A,应用程序B)。我想建立一个网页,在其中按下按钮并使用Branch Web API生成到App A的分支链接(深层链接)。然后有第二个按钮将生成到App B的深层链接。
这可能吗?
据我所知,当我们使用以下命令初始化JS Branch库时,所有带有“活动键”的对象都将1:1映射到应用程序:
branch.init('key_live_YOUR_KEY_GOES_HERE');
您可以看到Branch.IO文档代码示例在创建深层链接时未指定应用程序:-
var linkData = { campaign: 'content 123', channel: 'facebook', feature: 'dashboard', stage: 'new user', tags: [ 'tag1', 'tag2', 'tag3' ], alias: '', data: { 'custom_bool': true, 'custom_int': Date.now(), 'custom_string': 'hello', '$og_title': 'Title', '$og_description': 'Description', '$og_image_url':'http://lorempixel.com/400/400' } }; branch.link(linkData, function(err, link) { console.log(link); });
当Unity应用程序启动并且在内部分支机构Unity sdk通过以下方式从Branch.cs内部设置密钥时,情况相同:-
_setBranchKey(BranchData.Instance.liveBranchKey);
在此之后,所有Branch链接的创建都是通过静态函数完成的,因此无法运行此实例的多个实例。
据我从阅读Branch文档时得知,生成链接时,无法指定您要定位的应用程序(除了init键之外)。因此,它只限于一个应用程序。这是正确的,还是我还不知道另一种方法?
我在Branch IO信息中心中注册了两个不同的iOS / Unity应用程序(应用程序A,应用程序B)。我想建立一个网页,在其中按下按钮并使用Branch Web API生成分支链接(深层...
您可以直接使用Branch API调用,而不使用Web SDK。请参阅https://help.branch.io/developers-hub/docs/deep-linking-api#section-creating-a-deep-linking-url。您可以通过更改curl命令中的“键”来为多个应用生成链接。