Use Cursor, Claude Code, or another AI to help you integrate the Flutter SDK.
Appstack ID and attribution params
Afterconfigure, you can read the Appstack user ID and the attribution map for partner integrations (for example Superwall, RevenueCat).
getAppstackId()— Appstack user identifier when a partner expects$appstackIdor similar.getAttributionParams()— Attribution payload (campaign, media source, click IDs, device identifiers where available) to forward to partners.
pub.dev repository
Here, you will find the pub.dev appstack_plugin documentation. Please use the latest available version of the SDK.Requirements
iOS
- iOS version: 13.0+ (14.3+ recommended for Apple Ads)
- Xcode: 14.0+
Android
- Minimum SDK: Android 5.0 (API level 21)
- Target SDK: 34+
General
- Flutter: 3.3.0+
- Dart: 2.18.0+
Initial setup
Installation
Add to your Then run:iOS ConfigurationRun pod install:Note: The iOS AppstackSDK.xcframework is bundled with the plugin; no additional dependencies are needed.Android ConfigurationAdd the repository to your No additional configuration is needed for Android; the SDK will work automatically after installation.
pubspec.yaml:android/build.gradle:Quickstart
Follow these steps to get the API key:
- In Appstack, from the side menu, select SDK and ensure you are selecting the correct application.
- Select the environment. It could be Production or Development.
- Copy the assigned API key.
Configuration parameters
Initializes the SDK with your API key. Must be called before any other SDK methods.Parameters:
apiKey- Your platform-specific API key from the Appstack dashboardisDebug- Optional debug mode flag (default: false)endpointBaseUrl- Optional custom endpointlogLevel- Optional log level: 0=DEBUG, 1=INFO, 2=WARN, 3=ERROR (default: 1)
true if configuration was successfulExample:Sending events
Track user actions and revenue in your activities:Available EventType valuesIt is recommended to use standard events for a smoother experience.To improve matching quality on Meta, send events including the following parameters if you can fulfill them:
EventType.install- App installation (tracked automatically)EventType.login,EventType.signUp,EventType.register- AuthenticationEventType.purchase,EventType.addToCart,EventType.addToWishlist,EventType.initiateCheckout,EventType.startTrial,EventType.subscribe- MonetizationEventType.levelStart,EventType.levelComplete- Game progressionEventType.tutorialComplete,EventType.search,EventType.viewItem,EventType.viewContent,EventType.share- EngagementEventType.custom- For application-specific events
eventType- Event type from the EventType enum (required)eventName- Event name for custom events (optional, required when eventType is custom)parameters- Optional map of parameters (e.g.,{'revenue': 29.99, 'currency': 'USD'})
true if event was sent successfully.Enhanced app campaignsFor any event that represents revenue, we recommend sending:revenueorprice(number)currency(string, e.g.EUR,USD)
emailname(first + last name in the same field)phone_numberdate_of_birth(recommended format:YYYY-MM-DD)
Advanced usage
Environment-based configuration
Set up different API keys for different environments:Platform-specific considerations
iOS
Apple Ads attribution:- Only works on iOS 14.3+
- Requires app installation from App Store or TestFlight
- Attribution data appears within 24-48 hours
- User consent may be required for detailed attribution (iOS 14.5+)
Android
Play Store Attribution- Install referrer data collected automatically
- Attribution available immediately for Play Store installs
- Works with Android 5.0+ (API level 21)
Cross-platform best practices
Limitations
Attribution timing
- iOS: Apple Ads attribution data appears within 24-48 hours after install
- Android: Install referrer data available immediately for Play Store installs
- Attribution only available for apps installed from official stores
Platform constraints
- iOS: Requires iOS 14.3+
- Android: Minimum API level 21 (Android 5.0)
- Flutter: 3.3.0+
- Some Apple Ads features may not work in development/simulator environments
Event tracking
- Event names are case-sensitive and standardized
- For revenue events, always pass a
revenue(orprice) and acurrencyparameter - The SDK must be initialized before any tracking calls
enableAppleAdsAttribution()only works on iOS and returns false on Android- Network connectivity required for event transmission (events are queued offline)
Superwall
To start using the Superwall integration, click here to see the correct SDK documentation.Apple Ads
To start using the Apple Ads integration, click here to see the correct SDK documentation.Support
For questions or issues:- Check the GitHub Repository
- Contact our support team at support@appstack.tech
- Open an issue in the repository
Use Cursor, Claude Code, or another AI to validate your existing Appstack Flutter plugin integration.