Skip to content

selfapy/react-native-launch-arguments

 
 

Repository files navigation

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>();

About

Get launch arguments for testing with Detox and Appium

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 46.1%
  • C++ 16.2%
  • Objective-C 10.4%
  • Objective-C++ 8.5%
  • JavaScript 8.1%
  • Ruby 4.5%
  • Other 6.2%