Last updated:
0 purchases
appcues flutter
Appcues Flutter Plugin #
Appcues Flutter Plugin allows you to integrate Appcues experiences into your Flutter apps for iOS and Android devices.
This Plugin package is a bridge between the native Appcues SDKs in a Flutter application which sends user properties and events to the Appcues API and retrieves and renders Appcues content based on those properties and events.
Appcues Flutter Plugin
π Getting Started
Prerequisites
Android
iOS
Installation
One Time Setup
Initializing the SDK
Supporting Builder Preview and Screen Capture
Identifying Users
Tracking Screens and Events
Anchored Tooltips
Embedded Experiences
π Documentation
π¬ Examples
π· Contributing
π License
π Getting Started #
Prerequisites #
Android
Your application's build.gradle must have a compileSdkVersion of 34+ and minSdkVersion of 21+
android {
compileSdkVersion 34
defaultConfig {
minSdkVersion 21
}
}
copied to clipboard
Due to the SDK usage of Jetpack Compose, it is required to either:
apply kotlin-android plugin in app's build.gradle file.
plugins {
id 'com.android.application'
id 'kotlin-android'
}
copied to clipboard
OR Update Android Gradle Plugin 8.4.0+
Related Google issue regarding usage of the Jetpack Compose dependency versions 1.6+
iOS
Your application must target iOS 11+ to install the SDK, and iOS 13+ to render Appcues content. Update the iOS project xcodeproj to set the deployment target, if needed - typically in iOS/Runner.xcodeproj. In the application's Podfile, include at least this minimum version.
# Podfile
platform :ios, '11.0'
copied to clipboard
Installation #
Add appcues_flutter as a dependency in your pubspec.yaml file.
dependencies:
appcues_flutter: <latest_version>
copied to clipboard
Then, install the dependency by running flutter pub get from the terminal.
One Time Setup #
Initializing the SDK
An instance of the Appcues SDK should be initialized when your app launches.
import 'package:appcues_flutter/appcues_flutter.dart';
Appcues.initialize('APPCUES_ACCOUNT_ID', 'APPCUES_APPLICATION_ID');
copied to clipboard
Initializing the SDK requires you to provide two values, an Appcues account ID, and an Appcues mobile application ID. These values can be obtained from your Appcues settings. Refer to the help documentation on Registering your mobile app in Studio for more information.
Supporting Builder Preview and Screen Capture
During installation, follow the steps outlined in Configuring the Appcues URL Scheme. This is necessary for the complete Appcues builder experience, supporting experience preview, screen capture and debugging.
Identifying Users #
In order to target content to the right users at the right time, you need to identify users and send Appcues data about them. A user is identified with a unique ID.
// Identify a user
Appcues.identify('my-user-id');
// Identify a user with property
Appcues.identify('my-user-id', {'Company': 'Appcues'});
copied to clipboard
After identifying a user, you can optionally associate that user with group.
// Associate a user with a group, optionally including group properties
Appcues.group('group-id', {'Plan Tier': 'standard'});
copied to clipboard
To ensure the most accurate content targeting based upon group information, it's recommended to supply the group information immediately after a new user is identified.
Tracking Screens and Events #
Events are the βactionsβ your users take in your application, which can be anything from clicking a certain button to viewing a specific screen. Once youβve installed and initialized the Appcues Flutter Plugin, you can start tracking screens and events using the following methods:
// Track event
Appcues.track('Sent Message');
// Track event with property
Appcues.track('Deleted Contact', {'ID': 123 });
// Track screen
Appcues.screen('Contact List');
// Track screen with property
Appcues.screen('Contact Details', {'Contact Reference': 'abc'});
copied to clipboard
Anchored Tooltips #
Anchored tooltips use element targeting to point directly at specific views in your application. For more information about how to configure your application's views for element targeting, refer to the Anchored Tooltips Guide.
Embedded Experiences #
Add AppcuesFrameView instances in your application layouts to support embedded experience content, with a non-modal presentation. For more information about how to configure your application layouts to use frame views, refer to the guide on Configuring an AppcuesFrameView.
π Documentation #
Full documentation is available at https://docs.appcues.com/
π¬ Examples #
The example directory in this repository contains full example iOS/Android app to providing references for correct installation and usage of the Appcues API.
π· Contributing #
See the contributing guide to learn how to get set up for development and how to contribute to the project.
π License #
This project is licensed under the MIT License. See LICENSE for more information.
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.