React Native module to get launch arguments. It makes passing parameters from testing tool such as Detox to react native super easy.
Mostly it's made for using
launchArgs parameter of device.launchApp method
of DetoxoptionalIntentArguments (Android)
andprocessArguments (iOS)
parameters with Appium
iOS: it takes data from [[NSProcessInfo processInfo] arguments]
Android: it takes data from currentActivity.getIntent().getBundleExtra("launchArgs")
for detox and intent.getExtras()
for ADB params
npm i @qeepsake/react-native-launch-arguments
cd ios && pod install && cd ..
In JS:
import { LaunchArguments } from "@qeepsake/react-native-launch-arguments";
LaunchArguments.value();
In TS:
import { LaunchArguments } from "@qeepsake/react-native-launch-arguments";
interface MyExpectedArgs {
authToken?: string;
skipAuth?: boolean;
}
LaunchArguments.value<MyExpectedArgs>();
MIT ยฉ qeepsake
Thanks goes to these wonderful people (emoji key):
Luke Brandon Farrell ๐ ๐ป |
iamolegga ๐ ๐ป ๐ |
This project follows the all-contributors specification. Contributions of any kind welcome!