Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
react-native-launch-arguments
Advanced tools
React Native module to get launch arguments. Make passing parameters from testing tool to react native super easy.
Mostly it's made for using:
launchArgs parameter of device.launchApp method
of Detox (see the launch arguments guide for full details)optionalIntentArguments (Android)
and processArguments (iOS)
parameters with Appium
capabilities: {
optionalIntentArguments: `--ez myBool true --es myStr 'string text'`, // Android
processArguments: {args : ['-myBool', 'true','-myStr', 'string text']}, // iOS
}
arguments parameter of launchApp command
of Maestro
- launchApp:
appId: "com.example.app"
arguments:
foo: "This is a string"
isFooEnabled: false
fooValue: 3.24
fooInt: 3
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 react-native-launch-arguments
cd ios && pod install && cd ..
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>();
Due to React Native issue #37518, on Android, the module force-waits for the Android activity to reach the RESUMED state, before moving foward with native-modules initialization completion. While commonly the wait is scarce (the activity is already in the resumed state at this point), until the RN issue is fixed, the module may introduce delays in app loading time in some edge cases.
To launch the app with arguments, verifying your install, you can:
You can use xcrun
to boot your app on the simulator.
The following command-line will load your app on the booted iOS simulator. Just
replace com.MyAppBundleId
with your Bundle Identifier, and the params
with
your params.
xcrun simctl launch booted com.MyAppBundleId -noParams -param "hello"
FAQs
React Native module for getting launch arguments
The npm package react-native-launch-arguments receives a total of 43,369 weekly downloads. As such, react-native-launch-arguments popularity was classified as popular.
We found that react-native-launch-arguments demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.