InAppify

Install and start with Flutter

Install inappify_sdk 0.2.1, prepare Android/iOS, configure the first session and understand Flutter Web.

This guide targets inappify_sdk 0.2.1. Static InappifySdk operations share one session; do not create a separate session per screen.

Install the package

Add to the host's pubspec.yaml:

dependencies:
  flutter:
    sdk: flutter
  inappify_sdk: ^0.2.1

Run flutter pub get. This release requires Dart 3.12 and Flutter 3.44 or newer. Verify the resolved version in pubspec.lock as well.

Android

Use JDK 17 and compileSdk at least 37. The plugin uses Kotlin SDK v0.2.1; do not add another native SDK dependency. Add maven { url = uri("https://jitpack.io") } alongside Google Maven and Maven Central in the host's dependency repositories, not pluginManagement.

The current plugin toolchain is Gradle 9.3.1, AGP 9.1.1 and Kotlin 2.4.0. Keep the host compatible with its Flutter version and other plugins. AGP 9 built-in Kotlin needs Flutter 3.47 or newer. For older hosts follow the released Android guide, preserving unrelated dependencies.

For Bazaar/Myket, update the existing MainActivity.kt, retaining the real package and other integrations:

package com.example.app

import io.flutter.embedding.android.FlutterFragmentActivity

class MainActivity : FlutterFragmentActivity()

The bridge supplies the foreground Activity. Do not pass one from Dart, copy store helpers, or forward onActivityResult manually.

iOS

The Swift companion uses CocoaPods, app metadata and Keychain; it does not implement StoreKit. Provide a valid bundle identifier, version and positive integer build number. Use the higher deployment minimum required by Flutter and dependencies; the podspec alone does not establish Flutter's supported minimum.

First connection

After WidgetsFlutterBinding.ensureInitialized(), call once from the application's startup service:

import 'package:inappify_sdk/inappify_sdk.dart';

Future<bool> configureMobile(String apiKey, {String? customerId}) async {
  final result = await InappifySdk.configureResult(
    apiKey: apiKey,
    appUserIdentifier: customerId,
  );
  return result.isSuccess;
}

Use configureMobile('YOUR_PUBLIC_APP_KEY') before host authentication, or configureMobile('YOUR_PUBLIC_APP_KEY', customerId: 'customer_123') for an already authenticated account. Use logInResult(id) for later login; omitted identity does not sign out a retained session.

Display and purchase

Load the offering with getCurrentOfferingResult(placementIdentifier: 'upgrade'), render its packages, and pass the original PackageModel to purchaseResult. Those guides cover complete results and recovery.

Convenience methods such as getOfferings() return nullable models or bool. Their *Result variants preserve structured failures and are preferable for purchase/recovery decisions. syncAttributesAndOfferingsIfNeeded() already returns a Result.

Flutter Web

Bundle/load JavaScript provider 0.2.0 before Flutter; pub get does not bundle it. Read the Web guide and support matrix. A facade signature does not imply Web backend implementation.

Configuration · API reference · Released source