Skip to main content

Prerequisites

  • Flutter SDK and Dart toolchain on your PATH
  • OnePub access (credentials provided by Moca)
  • Android: compileSdk 34+, minSdk 26+ (see Android setup)
  • iOS: platform 14.0+ in Podfile (see iOS setup)
Production mobile apps should use the production AIR pages and domains, including account.air3.com for passkey setup. Moca Chain mainnet is live; see Production mainnet access.

OnePub CLI

If onepub is not found, add Pub’s global bin directory to your PATH, for example: export PATH=$PATH:$HOME/.pub-cache/bin

Add the dependency

Option A — pubspec.yaml
Use the version your team recommends; check Release notes for current Flutter SDK versions. Option B — CLI
Then run:

Import

Initialize

Create an AirService instance and call initialize:
You receive your partnerId from us. The navigatorKey is used to overlay the dialogs that specific user flows need. During development, use Environment.sandbox and enable logging.

Next steps

  1. Android setup — asset statements, manifest, network security
  2. iOS setup — associated domains, Podfile
  3. Google Sign-In if you use Google login