rnl

react-native-launch-arguments

Get launch arguments for testing with Detox and Appium

Showing:

Popularity

Downloads/wk

2K

GitHub Stars

13

Maintenance

Last Commit

8mos ago

Contributors

3

Package

Dependencies

0

Size (min+gzip)

0.3KB

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

react-native-launch-arguments

React Native module to get launch arguments. Make passing parameters from testing tool to react native super easy.

Mostly it's made for using

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

Getting started

npm i react-native-launch-arguments
cd ios && pod install && cd ..

Usage

In JS:

import { LaunchArguments } from "react-native-launch-arguments";
LaunchArguments.value();

In TS:

import { LaunchArguments } from "react-native-launch-arguments";
interface MyExpectedArgs {
  authToken?: string;
  skipAuth?: boolean;
}
LaunchArguments.value<MyExpectedArgs>();

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100