iOS 问题排查
验证是否成功下载了 AASA 文件
- 将测试设备连接到您的 MAC
- 卸载应用
- 在 MAC 控制台中查看设备的控制台输出
- 安装您的应用并启动
- 通过 "swcd" 筛选控制台输出
- 如果成功下载 AASA,您将看到以下屏幕截图(如果未下载 AASA,则必须卸载应用,重新启动设备,然后重新安装应用)

无法打开应用
- Double check Integrate Branch
- Investigate if the device disabled universal links (Re-enable universal linking)
- Investigate if it is a link related issue (Deep links do not open app)
- Use Universal links validator
- Use AASA validator
- Use Test deep link
应用未传递数据
- See if issue is related to App not opening
- Investigate Branch console logs (Enable logging)
深度链接是长链
- 当应用无法与 Branch 服务器建立连接时出现
- 深度链接长链仍可以打开应用并传递数据
Deferred Deep Linking not Working
- It is possible that you have not enabled NativeLink™. That will cause deferred deep linking to not work on iOS 15+ devices on Private Relay
- To implement iOS NativeLink™, follow the instructions in our developer documentation.
Testing Steps:
- Click a one-off Branch Link where "$ios_nativelink"=true is set in the link parameters.
- Using a device on iOS 15+, uninstall the app from your device.
- Click the Branch Link from Apple Notes and have it route through Safari.
- Click the call-to-action and ensure that the link is copied to the iOS clipboard.
- Install or build the new app version directly from XCode.
Expected Behavior:
- Upon link redirect to the App Store, the user sees the new NativeLink experience.
- When the app opens, the user should see a notification that the app has pasted from the clipboard
- The API call to api2.branch.io/v1/open or v1/install should include a new parameter called "local_url".
追踪内容属性
- Used for Track content
Key | 值 |
---|---|
BNCRegisterViewEvent | 用户查看了对象 |
BNCAddToWishlistEvent | 用户将该对象添加到他们的愿望清单 |
BNCAddToCartEvent | 用户将对象添加到购物车 |
BNCPurchaseInitiatedEvent | 用户开始签出 |
BNCPurchasedEvent | 用户购买了该物品 |
BNCShareInitiatedEvent | 用户开始分享对象 |
BNCShareCompletedEvent | 用户完成了分享 |
重新启用 Universal Linking
- Apple 允许用户在 iOS 9和 iOS 10(iOS 11中已修复)上禁用每个设备上每个应用级别的 universal linking
- Use Test deep link to re-enable universal linking on the device
使用 BranchViewController 进行深度链接路由
- 在。。。之前添加
initSession
初始化 Branch - Recommend to Navigate to content instead
Branch.getInstance().registerDeepLinkController(ViewController(), forKey: "my-key", withPresentation: .optionShow)
[[Branch getInstance] registerDeepLinkController:customViewController forKey:@"my-key"withPresentation:BNCViewControllerOptionShow];
确定深度链接是否在无网络环境下来自 Branch
- Use for Universal Linking if you want to get the
true/false
response fromBranch.getInstance().continue(userActivity)
内continueUserActivity
without a Branch network call - 仅当您有自定义链接域时使用
- 添加
branch_universal_link_domains
to yourinfo.plist
with an array of your link domain from your Branch Dashboard

Updated about 1 month ago