To launch an arbitrary app with a given id (package name on Android, bundle id on iOS), do:
- launchApp:appId
If you need to clear the app state before launching the app, specify a clearState flag
- launchApp:appId:"com.example.app"clearState:trueclearKeychain:true# optional: clear *entire* iOS keychainstopApp:false# optional (true by default): stop the app before launching itpermissions: { all:deny } # optional: by default all permissions are allowed,# even if clearState: true is passed
If you want to test with a permission with a specific value, specify a permissions argument
- launchApp:permissions:notifications:unset# notification permission is unsetandroid.permission.ACCESS_FINE_LOCATION:deny# Android fine location permission is denied
Launch Arguments
You can send launch arguments while launching the app for both iOS and Android.
Sending launch arguments
Arguments allow sending String, Boolean, Double, and Integer. All other data types are by default passed as a String.
- launchApp:appId:"com.example.app"arguments:foo:"This is a string"isFooEnabled:falsefooValue:3.24fooInt:3
Receiving arguments on Android
intent.extras?.getBoolean("isFooEnabled")?.let {// Do something with isFooEnabled}intent.extras?.getString("foo")?.let {// Do something with foo}
Receiving arguments on iOS
if ProcessInfo.processInfo.arguments.contains("isFooEnabled") {// Do something with isFooEnabled}// By default all the values received here would be stringlet standardDefaultsDict = UserDefaults.standard.dictionaryRepresentation()let foo = (standardDefaultsDict["foo"]as?String) ??"defaultValue"