- Web
- Flutter
npm install @mocanetwork/airkit
Bundling
This module is distributed in 3 formatsesmbuilddist/airkit.esm.jsis es6 formatcommonjsbuilddist/airkit.cjs.jsin es5 formatumdbuilddist/airkit.umd.min.jsIn ES5 format without polyfilling corejs minified
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
OnePub PATH TroubleshootingIn case the
onepub command is not recognized, adding following to your PATH should help:export PATH=$PATH:$HOME/.pub-cache/binpubspec.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: ^1.5.0-beta.0
airkit using onepub pub add command.onepub pub add airkit
Android Configuration
Generate SHA256 fingerprint
In order to whitelist your Android app we would need the SHA-256 fingerprint of the certificate you use to sign your Android app. You will have different fingerprints for your debug and release builds.You can get this fingerprint by using thekeytool command:keytool -list -v -keystore <path-to-your-keystore> -alias <your-key-alias>
Update compileSdkVersion and minSdk
For Android buildcompileSdkVersion 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.appname"
compileSdkVersion 34
// ..
defaultConfig {
minSdk = 26
// ..
}
}
Configure asset links
For passkey to work, you need to add the following to yourandroid/app/src/main/res/values/strings.xml:<string name="asset_statements" translatable="false">
[
{"include": "https://account.air3.com/.well-known/assetlinks.json"},
{"include": "https://account.sandbox.air3.com/.well-known/assetlinks.json"}
]
</string>
iOS Configuration
App ID whitelisting
In order to whitelist your iOS app we would need one or more valid Apple App IDs that consist of:- Your Apple Team ID: This is a unique, 10-character alphanumeric string assigned to your developer account by Apple (e.g.,
ABCDE12345). You can find it in your Apple Developer account under “Membership Details” or by inspecting your provisioning profiles. - Your App’s Bundle Identifier: This is the unique identifier for your app, typically in reverse domain name format (e.g.,
com.example.appname). This is set in your Xcode project.
ABCDE12345.com.example.appname.Update global iOS platform
For iOS build global platform needs to be 14.0. CheckPodfile in your project to change the global platform.platform :ios, '14.0'
Configure associate domains
In order to enable passkey, following steps need to be done:- Open your project in Xcode (
ios/Runner.xcworkspace). - Select the
Runnertarget, go to the Signing & Capabilities tab. - Add the Associated Domains capability.
- Add following domains:
webcredentials:account.air3.comwebcredentials:account.sandbox.air3.com