AIR Kit
AIR Kit (1.2.x)
AIR Kit (1.2.x)
  • Introduction
    • Welcome!
    • Quickstart
  • About
    • Moca Network
  • Account SDK
    • Installation
    • Usage
    • Customization
    • Reference
    • Wagmi Connector
    • Release Notes
  • Flutter SDK
    • Installation
    • Usage
    • Reference
  • AIR CREDENTIALS
    • Introduction
    • Architecture & Core Technologies
    • Core Technologies and Key Components
      • Issuing Credentials
      • Issuer SDK
      • Verifiable Credentials
      • Verifier SDK
Powered by GitBook
On this page
  • Installation
  • Android Configuration
  • iOS Configuration
  1. Flutter SDK

Installation

Installation

Before you can install the AirKit Flutter package, you need to install the OnePub CLI in order to access our private package repository. We will provide you with the login credentials for OnePub.

Open your terminal and use following commands:

dart pub global activate onepub
onepub login

In case the onepub command is not recognized, adding following to your PATH should help: export PATH=$PATH:$HOME/.pub-cache/bin

To install the AirKit Flutter package, you have two options. You can either manually add the package in the pubspec.yaml file, or you can use the onepub pub add command.

Add airkit as a dependency to your pubspec.yaml.

dependencies:
  airkit:
    hosted: https://onepub.dev/api/sxhddavuhn/
    version: ^0.2.0

Add airkit using onepub pub add command.

onepub pub add airkit

Android Configuration

Update compileSdkVersion

For Android build compileSdkVersion needs to be at least 34 and minSdk needs to be at least 26. Check your app module gradle file in your project to change it.

android {
    namespace "com.example.app_name"
    compileSdkVersion 34
    // ..

    defaultConfig {
        minSdk = 26
        // ..
    }
}

Update Permissions

Open your app's AndroidManifest.xml file and add the following permission. Please make sure the <uses-permission> element should be a direct child of the <manifest> root element.

<uses-permission android:name="android.permission.INTERNET" />

Configure Redirection and Deep Linking

Open your app's AndroidManifest.xml file and add the following deep link intent filter to your Main activity based on {scheme}://{your_app_package}/auth.

<intent-filter>
  <action android:name="android.intent.action.VIEW" />

  <category android:name="android.intent.category.DEFAULT" />
  <category android:name="android.intent.category.BROWSABLE" />

  <data android:scheme="{scheme}" android:host="{your_app_package}" android:path="/auth" />
  <!-- E.g.: air://com.example.airkit/auth -->
</intent-filter>

We need to know the final deep link in order to whitelist on our end.

iOS Configuration

Update global iOS platform

For iOS build global platform needs to be 14.0. Check Podfile in your project to change the global platform.

platform :ios, '14.0'

Configure Redirection and Deep Linking

For iOS we need to know your final bundleId in order to whitelist on our end. The final URI will look like following: {bundleId}://auth.

PreviousRelease NotesNextUsage