The deeplink URL should include the miniapp ID and the relevant URL route if needed to land the user on a specific page.

The user will first deeplink to the host app, which then parses the deeplink to obtain the miniapp ID and the path to the page.


Open the homepage of the miniapp

iOS

Appboxo.shared.getExistingMiniapp(appId: "app_id")?.close()
        
let miniapp = Appboxo.shared.getMiniapp(appId: "app_id")
let config = MiniappConfig()
config.saveState = false
miniapp.setConfig(config: config)
miniapp.open(viewController: self)

Android

val appId = "<app_id>" // Get miniapp appId from deeplink
Appboxo.getExistingMiniapp(appId)?.close()
Appboxo.getMiniapp(appId)
    .setConfig(
        MiniappConfig.Builder()
            .saveState(false)
            .build()
    )
    .open(activity)

Capacitor

const appId = "<app_id>";  // Get miniapp appId from deeplink
Appboxo.closeMiniapp({ appId: appId });
Appboxo.openMiniapp({ appId: appId, saveState: false });

React Native

appboxosdk.closeMiniapp('[miniapp_id]');
appboxosdk.openMiniapp('[miniapp_id]', { saveState: false });

Flutter

const appId ="[app_id]"; // Get miniapp appId from deeplink
Appboxo.closeMiniapp(appId);
Appboxo.openMiniapp(appId, saveState: false);

Open a specific page within the miniapp

Swift

Appboxo.shared.getExistingMiniapp(appId: "app_id")?.close()
        
let miniapp = Appboxo.shared.getMiniapp(appId: "app_id")

let config = MiniappConfig()
config.saveState = false
miniapp.setData(data: ["deeplink" : "/help"]) // Example: '/path?id=123'
miniapp.setConfig(config: config)
miniapp.open(viewController: self)

Kotlin

val appId = "<app_id>" // Get miniapp appId from deeplink
Appboxo.getExistingMiniapp(appId)?.close()
Appboxo.getMiniapp(appId)
    .setConfig(
        MiniappConfig.Builder()
            .setData(mapOf("deeplink" to "/help"))
            .saveState(false)
            .build()
    )
    .open(activity)

Capacitor

const appId = "<app_id>";  // Get miniapp appId from deeplink
Appboxo.closeMiniapp({ appId: appId });
Appboxo.openMiniapp({
    appId: appId,
    data: {'deeplink': '/help'}, // Example: '/path?id=123'
    saveState: false
});

React Native

appboxosdk.closeMiniapp('[miniapp_id]');
appboxosdk.openMiniapp('[miniapp_id]',
 {
  data:{ deeplink:'/help' }, // Example: '/path?id=123'
  saveState: false
});

Flutter

const appId ="[app_id]"; // Get miniapp AppId from deeplink
Appboxo.closeMiniapp(appId);
Appboxo.openMiniapp(appId, data: {'deeplink': '/help'}, saveState: false);