2015-06-05 26 views

回答

0

您是絕對正確的,使用Branch Links表示您可以生成一個可以是用於利用您現有的深層鏈接URI路徑,而不管鏈接被點擊的操作系統如何。

This diagram說明分支鏈接如何跨操作系統工作。

要充分利用現有的深層鏈接路徑,正確配置鏈接重定向的方法是在'data'/'params'字典中指定「$ deeplink_path」鍵,並使用URI路徑的值您希望追加到您在儀表板上配置的URI方案。例如,您可以指定「$ deeplink_path」:「radio/station/456」,我們將使用URI「yourapp:// radio/station/456?link_click_id =分支標識符」打開應用程序。下面的代碼是什麼樣子的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 
}]; 

約分行真棒的是,它也可以讓你深層鏈接完成安裝過程,通過你的URI路徑通過任何應用程序商店

讓我知道這是否有幫助!