Skip to content

Instantly share code, notes, and snippets.

@Wizpna
Last active November 19, 2023 18:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Wizpna/8de9f44dd3bfe8898c1afcfdbea6a50c to your computer and use it in GitHub Desktop.
Save Wizpna/8de9f44dd3bfe8898c1afcfdbea6a50c to your computer and use it in GitHub Desktop.
A demonstration project illustrating how to implement appflyer in your Flutter project.
//this function initialize AppFlyer Plugin
Future<void> initAppFlyer() async {
AppsflyerSdk appsflyerSdk;
final appsFlyerOptions = AppsFlyerOptions(
//afDevKey is AppsFlyer Dev key and it's a required parameter
afDevKey: "3gnv2x6xnTA5sSXfoMEtcH",
//Your Apple Id is required for iOS apps and it's a required parameter
//To access your Apple ID visit: https://appstoreconnect.apple.com/apps
// Click on your app. Create a new app if you don't have one.
// Then click on App Information on the left side which will open a new window where you will find Apple ID
appId: "1234567890",
showDebug: kDebugMode,
timeToWaitForATTUserAuthorization: 50,
);
appsflyerSdk = AppsflyerSdk(appsFlyerOptions);
await appsflyerSdk.initSdk(
registerConversionDataCallback: true,
registerOnAppOpenAttributionCallback: true,
registerOnDeepLinkingCallback: true,
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment