Skip to main content

Overview

The Encore Flutter SDK is a plugin that wraps the native iOS (Encore.xcframework) and Android (com.encorekit:encore AAR) SDKs. All offer UI, billing, analytics, and entitlement logic runs natively — the Flutter layer is a thin bridge via platform channels. You’ll add the Dart package, then configure platform-specific dependencies for iOS and Android.

Prerequisites: Obtain Access Credentials

Before installing the SDK, obtain your access credentials from the Encore Dashboard.
Don’t have credentials? Visit dashboard.encorekit.com to create an account, add your app, and receive your SDK access credentials automatically.
You’ll need the following:
  • Access Token: A GitHub Personal Access Token (starts with ghp_...) provided through the Dashboard
  • API Key: Your public API key (starts with pk_...) for SDK configuration

Step 1: Add the Dart Package

Add the Encore Flutter SDK to your pubspec.yaml:
dependencies:
  encore: ^1.0.0
Replace {YOUR_ACCESS_TOKEN} with the GitHub Personal Access Token (starts with ghp_...) provided through your Dashboard.
Then fetch dependencies:
flutter pub get

Step 2: iOS Setup

The plugin depends on the EncoreKit CocoaPod, which bundles the native Encore.xcframework.

Set Deployment Target and Add EncoreKit

In your ios/Podfile, set the platform to iOS 15.0 or higher and add the EncoreKit pod source:
platform :ios, '15.0'

target 'Runner' do
  # ... existing config ...
  pod 'EncoreKit', :git => 'https://github.com/EncoreKit/ios-sdk-binary.git', :tag => 'v1.4.20'
end

Install Pods

cd ios && pod install && cd ..

Step 3: Android Setup

The plugin depends on com.encorekit:encore, distributed as a private Maven package on GitHub Packages.

Add the Repository

Add the Encore Maven repository to your project-level android/settings.gradle.kts:
dependencyResolutionManagement {
    repositories {
        google()
        mavenCentral()
        maven {
            url = uri("https://maven.pkg.github.com/EncoreKit/android")
            credentials {
                username = providers.gradleProperty("gpr.user")
                    .getOrElse(System.getenv("GITHUB_USERNAME") ?: "")
                password = providers.gradleProperty("gpr.token")
                    .getOrElse(System.getenv("GITHUB_TOKEN") ?: "")
            }
        }
    }
}

Configure Authentication

Add your credentials to ~/.gradle/gradle.properties (create the file if it doesn’t exist):
gpr.user=YOUR_GITHUB_USERNAME
gpr.token=YOUR_ACCESS_TOKEN
Never commit credentials to source control. Use gradle.properties in your home directory or environment variables for CI/CD.

Step 4: Verify Installation

After completing the platform setup, verify the SDK is available:
import 'package:encore/encore.dart';
Build and run your app to confirm everything compiles:
flutter run
Installation complete!

Next Steps

Now that the SDK is installed, continue with the integration: