Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Appy Flutter

Flutter plugin for Appy — iOS install attribution and revenue events.

Install

In your app's pubspec.yaml:

dependencies:
  appy_flutter:
    git:
      url: https://github.com/Apparence-io/Appy-flutter-plugin.git

Deployment target: iOS 13.0+. Works with both Swift Package Manager (flutter config --enable-swift-package-manager) and CocoaPods.

Setup

Configure once at launch with the credentials from your Appy dashboard (Setup page of your app):

import 'package:appy_flutter/appy_flutter.dart';

await Appy.configure(
  appId: 'YOUR_APP_ID',
  ingestSecret: yourIngestSecret, // don't hardcode it in plaintext
);

Track the install

Once you have a stable user id (e.g. your RevenueCat appUserId):

await Appy.setEmail(user.email); // optional, improves matching
await Appy.track(appUserId: user.id);

track is idempotent — safe to call on every launch.

Revenue events

Report monetization events only if you don't use the RevenueCat webhook (configuring both double-counts):

await Appy.logStartTrial(appUserId: user.id);
await Appy.logPurchase(
  appUserId: user.id, amount: 9.99, currency: 'USD', transactionId: tx.id);
await Appy.logSubscribe(
  appUserId: user.id, amount: 4.99, currency: 'EUR', transactionId: tx.id);

logStartTrial is sent once per user — safe on every launch. Pass the store transactionId to logPurchase/logSubscribe so each transaction is only recorded once.

QA

await Appy.clear(); // reset local state — never ship this call

Android is currently a no-op: every method returns AppyResult.unsupported.

About

A plugin for the Appy board

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages