appsFlyer-flutter-plugin
AppsFlyer SDK 的 Flutter 插件
- 星標
- 187
- 分支
- 140
- 最近推送(UTC)
- 2026年9月15日
- 專案狀態
- 未封存
原始 README
以下為英文專案原文快照,最新內容請造訪 GitHub。
appsflyer-flutter-plugin

Flutter plugin for the AppsFlyer mobile attribution and analytics SDK on Android and iOS.
🛠 In order for us to provide optimal support, please contact AppsFlyer support through the Customer Assistant Chatbot for assistance with troubleshooting issues or product guidance.
To do so, please follow this article
SDK Versions
This plugin release bundles:
| Platform | RPC layer the plugin pins | AppsFlyer SDK it brings |
|---|---|---|
| Android | af-android-plugin-bridge v7.0.13 |
v7.0.1 |
| iOS | AppsFlyerRPC v7.0.13 |
v7.0.2 |
Since v7.0.0 the plugin integrates through the AppsFlyer RPC layer instead of
depending on the native SDK directly. On Android the SDK is resolved transitively
by the bridge — do not pin com.appsflyer:af-android-sdk yourself. On iOS the
podspec pins AppsFlyerFramework explicitly, and it must stay on the version
AppsFlyerRPC requires.
Purchase Connector versions
When Purchase Connector is enabled in your app:
- Android 2.2.0
- iOS 7.0.2
❗❗ Breaking changes when updating to v7.x.x ❗❗
The public Flutter API changed in this major release. For the native SDK versions this release resolves to, see SDK Versions above.
- Minimum supported versions: Flutter
3.35.0, Dart3.9.0(and earlier than4.0.0), Android API 21, and iOS 13.0. On Android the plugin also requires Kotlin Gradle Plugin2.0.21, Android Gradle Plugin8.9.1, Gradle8.11.1and JDK 17, matching the AppsFlyer Android SDK. Flutter3.35templates all of them — see doc/installation-guide.md.
Use AppsFlyerSdk.instance, call init(devKey:, appId:) (appId is required
on iOS and optional on Android), register the listeners you need with their
callbacks, and call start() from the session-ready callback:
final appsflyerSdk = AppsFlyerSdk.instance;
// If your app handles deep links, register before init(). Android decides once
// per install, while init() processes the launch intent, whether to request the
// deferred deep link — registering later skips it for that install permanently.
await appsflyerSdk.registerDeepLinkListener(onDeepLinking: (result) {
print('Deep link: ${result.deepLink?.deepLinkValue}');
});
await appsflyerSdk.init(
devKey: '<DEV_KEY>',
appId: '<APP_ID>',
);
await appsflyerSdk.registerSessionReadyListener(() async {
await appsflyerSdk.start();
});
All removed APIs, renamed APIs, lifecycle changes, and upgrade instructions are documented in doc/migration-guide.md.
AD_ID permission for Android
In v6.8.0 of the AppsFlyer SDK, we added the normal permission com.google.android.gms.permission.AD_ID to the SDK's AndroidManifest,
to allow the SDK to collect the Android Advertising ID on apps targeting API 33.
If your app is targeting children, you need to revoke this permission to comply with Google's Data policy.
You can read more about it in the Android SDK installation guide.
📖 Guides
使用的依賴
依賴清單 8 項
- flutter
{"sdk":"flutter"} - json_annotation
^4.9.0 - flutter_test開發依賴
{"sdk":"flutter"} - test開發依賴
^1.16.5 - mockito開發依賴
^5.4.4 - flutter_lints開發依賴
^5.0.0 - build_runner開發依賴
^2.3.0 - json_serializable開發依賴
^6.5.4
如何選擇適合專案的儲存庫?
先依使用情境篩選,再比較專案活躍情況,最後到原始儲存庫確認使用要求。
- 透過儲存庫名稱、作者或描述搜尋,再依技術分類縮小範圍。
- 綜合星標、分支與最近推送比較專案;星標反映社群關注,不保證品質。
- 使用前在 GitHub 確認 README、授權條款與 Issues。
來源與維護
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗