Flutter 分支 IO 集成和归因工具

问题描述

我正在使用 flutter_branch_sdk 包来集成分支 IO SDK

我正在尝试跟踪用户安装归因,用户来自何处,例如来自 twitter、Instagram 和此类 xyz 网站的用户

颤动版本:

颤振 1.22.5 渠道稳定 https://github.com/flutter/flutter.git 框架 修订 7891006299 (6 周前) • 2020-12-10 11:54:40 -0800 引擎 • 修订版ae90085a84 工具 • Dart 2.10.4

在 init 方法中我检查 FlutterBranchSdk.validateSDKIntegration();并通过错误

输出

D/BranchSDK_Doctor( 8544):
D/BranchSDK_Doctor( 8544): ------------------- Initiating Branch integration verification --------------------------- ...
D/BranchSDK_Doctor( 8544): 1. Verifying Branch instance creation ...
D/BranchSDK_Doctor( 8544): Passed
D/BranchSDK_Doctor( 8544): 2. Checking Branch keys ...
D/BranchSDK_Doctor( 8544): Passed
I/BranchSDK( 8544): getting https://api2.branch.io/v1/app-link-settings/key_test_pp6bmR0ECJa5GS3?Metadata
I/BranchSDK( 8544): returned {"android_uri_scheme":"https://companyname.com://","android_package_name":"com.abc.name.app","short_url_domain":"","default_short_url_domain":"abc.test-app.link","alternate_short_url_domain":" test link change for security purpose","ios_uri_scheme":"iOS url","ios_team_id":"iOS_team id","ios_bundle_id":"id"}
D/BranchSDK_Doctor( 8544): 3. Verifying application package name ...
D/BranchSDK_Doctor( 8544): ** ERROR ** : Incorrect package name in Branch dashboard. Please correct your package name in dashboard -> link Settings page.
D/BranchSDK_Doctor( 8544): Please follow the link for more info https://docs.branch.io/pages/dashboard/integrate/#android

PS:为了安全起见,上面的一些信息发生了变化,但我多次检查我的包名是否正确

最近两天我一直在关注这个话题

提前致谢:)

解决方法

供以后参考:

如果您发现集成验证器返回错误 incorrect package name 的类似问题,请确保您按照设置的仪表板配置使用 API 密钥。

如果 testMode 设置为 true,您需要在 Branch Dashboard 的 TestMode 中配置您的应用程序详细信息,反之亦然。