appvue_plugin 0.0.1
appvue_plugin: ^0.0.1 copied to clipboard
Flutter plugin for AppVue SDK integration, supporting install tracking, event reporting, and deep linking.
AppVue Flutter Plugin #
A Flutter plugin for AppVue SDK integration, supporting install tracking, event reporting, and deep linking.
Features #
- ✅ SDK Initialization
- ✅ Install Tracking & Attribution
- ✅ Event Reporting
- ✅ Deep Link (Universal Links & URL Schemes)
- ✅ Wakeup Data Stream
Platform Support #
| Platform | Support |
|---|---|
| Android | ✅ SDK 24+ |
| iOS | ✅ iOS 13+ |
Installation #
Add appvue_plugin to your pubspec.yaml:
dependencies:
appvue_plugin: ^0.0.1
Then run:
flutter pub get
Platform Configuration #
Android #
-
Download AAR file from AppVue Console
-
Add AAR to your project:
your_flutter_app/ └── android/ └── app/ └── libs/ └── appvue-v1.0.0-release.aar -
Configure build.gradle (
android/app/build.gradle):dependencies { implementation(fileTree(dir: 'libs', include: ['*.aar'])) } -
Configure AppKey (
android/app/build.gradle):android { defaultConfig { manifestPlaceholders = [APPVUE_APPKEY: "YOUR_APP_KEY"] } }
iOS #
-
AppVueSDK is automatically installed via CocoaPods
-
Configure AppKey (
ios/Runner/Info.plist):<key>com.appvue.appkey</key> <string>YOUR_APP_KEY</string> -
Configure Universal Links (Optional):
Create
ios/Runner/Runner.entitlements:<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>com.apple.developer.associated-domains</key> <array> <string>applinks:your-domain.appvue.net</string> </array> </dict> </plist>
Usage #
Import #
import 'package:appvue_plugin/appvue_plugin.dart';
Initialize SDK #
await AppvuePlugin.initializeSDK();
Report Event #
await AppvuePlugin.reportEvent("event_code", 1);
Get Install Data #
final installData = await AppvuePlugin.getInstallData();
print('Channel: ${installData.channel}');
print('Referrer: ${installData.referrer}');
Handle Deep Link Wakeup #
// Check if app was opened via deep link
bool hasWakeupData = await AppvuePlugin.hasWakeupData();
if (hasWakeupData) {
final wakeupData = await AppvuePlugin.getWakeupData();
print('Wakeup Channel: ${wakeupData.channel}');
}
// Listen for wakeup events (when app is already running)
AppvuePlugin.wakeupDataStream.listen((data) {
print('Received wakeup: ${data.channel}');
});
API Reference #
| Method | Description |
|---|---|
initializeSDK() |
Initialize AppVue SDK |
reportEvent(code, value) |
Report custom event |
getInstallData() |
Get install attribution data |
hasWakeupData() |
Check if deep link wakeup data exists |
getWakeupData() |
Get deep link wakeup data |
wakeupDataStream |
Stream of deep link wakeup events |
Error Handling #
try {
await AppvuePlugin.initializeSDK();
} on AppVueSDKNotFoundException catch (e) {
print('SDK not found: ${e.message}');
} on AppVueSDKInvalidException catch (e) {
print('SDK invalid: ${e.message}');
} on AppVueInitializationException catch (e) {
print('Init failed: ${e.message}');
}
Requirements #
- Flutter >= 3.3.0
- Dart >= 3.0.0
- Android SDK >= 24
- iOS >= 13.0
Links #
License #
MIT License. See LICENSE file.