appactor_flutter 0.0.5
appactor_flutter: ^0.0.5 copied to clipboard
AppActor Flutter SDK — server-authoritative in-app purchase management for iOS and Android.
AppActor
In-App Purchase Infrastructure
for Flutter
AppActor handles in-app purchases, subscriptions, and entitlements so you can focus on building your app. One SDK for both iOS and Android.
Installation #
dependencies:
appactor_flutter: ^0.0.5
Quick Start #
import 'package:appactor_flutter/appactor_flutter.dart';
// Configure once. This returns after the native bootstrap flow completes.
await AppActor.instance.configure(
'pk_YOUR_API_KEY',
// Optional: pass appUserId to start with an explicit identity.
// Omit it to reuse a cached ID or create a new anonymous user.
appUserId: 'user_123',
);
// Fetch offerings
final offerings = await AppActor.instance.getOfferings();
// Make a purchase
final result = await AppActor.instance.purchasePackage(
offerings.current!.monthly!,
);
// Check entitlements
final info = await AppActor.instance.getCustomerInfo();
final isPremium = info.hasActiveEntitlement('premium');
Purchase Sync In 0.0.5 #
// Current native sync behavior:
// drains the receipt queue, then refreshes customer info.
final refreshed = await AppActor.instance.syncPurchases();
// Available in Flutter 0.0.5:
// lightweight sync without draining the receipt queue.
final quiet = await AppActor.instance.quietSyncPurchases();
// Explicit queue-drain API exposed by the native plugins.
final drained = await AppActor.instance.drainReceiptQueueAndRefreshCustomer();
Platform Notes #
configure()returns after the native SDK finishes bootstrap.- Pass
appUserId:toconfigure()if you want to start with a known user ID. - Call
enableSearchAdsTracking()beforeconfigure()if you use Apple Search Ads attribution on iOS. - Call
enableInstallReferrer()afterconfigure()if you want Google Play Install Referrer support on Android. - iOS-only APIs such as
presentOfferCodeRedeemSheet(),getAsaDiagnostics(), andpurchaseFromIntent()throwUnsupportedErroron non-iOS platforms.
Documentation #
Visit appactor.com/docs for full documentation.
Contributing #
- Open an issue for bug reports or feature requests
- Email us at sdk@appactor.com
License #
MIT License. See LICENSE for details.