Setup Native Mini-app
Follow steps below to setup a native android/ios mini-app
#
Package your mini-app as a libraryPackage your mini-app as a library (android .aar or ios .framework)
We have a TODO list that is best practices for packaging your app as a library. This would help reduce conflicts when building host-app & mini-app code together. Please contact us for more info.
#
Create connector moduleThis module is the bridge between your mini-app and Terra
system, its purpose is to decouple them.
Hestia
library#
1. Import - Android
- iOS
A recommendation is to import your mini-app sdk here so host-app do not need to import it explicitly. We also prefer to use implementation
import to hide details of mini-app from host-app
AndroidNativeAppLauncher
interface / IOSAppLauncherProtocol
protocol#
2. Implement - Android
- iOS
AppLauncherData
#
3. Read Auth result from - If your mini-app uses Exchange Token Flow then use below code to get the
exchangedIdToken
- Android
- iOS
#
4. Setup params on Terra DashboardPlease provide us following data, we will do it for you:
- Android
- iOS
- The connector module class that implement
AndroidNativeAppLauncher
- Extra data that you want to receive in
AppLauncherData
- The connector module class that implement
IOSAppLauncherProtocol
- Extra data that you want to receive in
AppLauncherData
#
Prepare package repository- Send us your mini-app library file and connector module library file, we will push them to Teko package registry, for other host-app to easily import.
- You can also upload them to your own package registry, then send us the information including:
- Artifacts names & version
- Access guide - in case your repository is private. Something like this