如何获取分支指标 links 以支持现有的深度 link 路径?

How do I get branch metrics links to support existing deep link paths?

我在商店中已有 iOS 和 Android 应用程序支持 deeplinking。是否可以使用 Branch.io 以便单个 link 可以深入 link 依赖于 OS 和 link 被点击的任一应用程序?

例如我使用的 deeplink 是 example://view/account 我想在给我的客户

的电子邮件中使用类似 http://example.com/account 的内容

您完全正确,使用 Branch Links 意味着您可以生成单个 link,可用于利用现有的深层 link URI 路径,而不管OS点击进入link

This diagram 说明分支链接如何跨操作系统工作。

要利用现有的深度 link 路径,正确配置 link 重定向的方法是在“数据”/中指定“$deeplink_path”键'params' 字典,其中包含您希望附加到您在仪表板上配置的 URI 方案的 URI 路径的值。

例如,您可以指定“$deeplink_path”:"radio/station/456” and we'll open the app with the URI "yourapp://radio/station/456?link_click_id=branch-identifier”。代码如下在该示例中查找 iOS:

NSMutableDictionary *params = [[NSMutableDictionary alloc] init];    

// Customize the display of the link
[params setObject:@"Great Radio Station forKey:@"$og_title"];
[params setObject:@"url.to.picture/radiopic.png" forKey:@"$og_image_url"];
[params setObject:@"This is my jam" forKey:@"$og_description"];

// Set the deep link path
[params setObject:@"radio/station/456" forKey:@"$deeplink_path"];

Branch *branch = [Branch getInstance];
[branch getShortURLWithParams:params andCallback:^(NSString *url, NSError *error) {
    // show the link to the user or share it immediately
}];

Branch 最棒的地方在于,它还可以让您深入 link 安装过程,通过任一应用商店传递您的 URI 路径。

如果有帮助请告诉我!