iOS 测试


  • Create a deep link from the Branch Dashboard
    • 从设备中删除您的应用
    • 在设备上编译和测试
    • 将深度链接粘贴到 Apple Notes
    • 长按深度链接(而不是 3D Touch)
    • 点击Open in "APP_NAME" 打开您的应用

Test Deferred Deep Link

Deferred deep linking is simply deep linking into an app that is not yet installed. Once the app is installed, the context is preserved and the user's first app-open will have the deep link data from the original Branch Link.

  1. Enable NativeLink™ Deferred Deep linking
  2. Ensure the app is uninstalled from your device
  3. Click a Branch Link
    • If you enabled NativeLink™ correctly (either through the Branch Dashboard or by adding $ios_nativelink=trueon the Branch Link as a query parameter (ex.$ios_nativelink=true)) then it should route you to the deepview to download the app. DO NOT DOWNLOAD THE APP FROM HERE
  4. Manually launch the app from Xcode

You should be routed to the correct content within your app if you configured deep-linked routing properly (ex. URL, URI Schema, key/value pair).

启用 Logging

  • 使用 Branch test key 而非 live key
  • 在。。。之前添加 initSession 初始化 Branch
  • 在发布到生产环境之前将其删除
[[Branch getInstance] enableLogging];
  • Make sure OS_ACTIVITY_MODE is not disabled (link)

测试您的 Branch 集成

通过调用。。。来测试您的 Branch 集成 validateSDKIntegration in your AppDelegate. Check your Xcode logs to make sure all the SDK Integration tests pass. Make sure to comment out or remove validateSDKIntegration in your production build.

[[Branch getInstance] validateSDKIntegration];

使用 Test Key

  • Use the Branch test key instead of the live key
  • 在。。。之前添加 initSession 初始化 Branch
  • Update branch_key in your Info.plist to a dictionary (example)
  • The test key of your app must match the test key of your deep link
  • 在发布到生产环境之前将其删除
[Branch setUseTestBranchKey:YES];


模拟 Install

要确保正确设置 SDK,您不再需要通过 SDK 本身模拟 install。您可以改为通过完成以下步骤来进行端到端功能测试:

测试 Branch Link 的深度链接路由

Append ?bnc_validate=true to any of your app's Branch links and click it on your mobile device (not the Simulator!) to start the test. For instance, to validate a link like: "https://<yourapp\>" click on: "https://<yourapp\>"



Domain AASA 验证器工具



App Indexing 验证器工具


显示 Branch 集成状态。为了获得最佳体验,我们建议您完成列出的所有步骤。如果特定平台与您无关,请跳过该部分。