$ npm install react-native-ios-launch-arguments --save
$ react-native link react-native-ios-launch-arguments
- In XCode, in the project navigator, right click
Libraries
➜Add Files to [your project's name]
- Go to
node_modules
➜react-native-ios-launch-arguments
and addRNAppLaunchArguments.xcodeproj
- In XCode, in the project navigator, select your project. Add
libRNAppLaunchArguments.a
to your project'sBuild Phases
➜Link Binary With Libraries
- Run your project (
Cmd+R
)<
import getLaunchArguments from 'react-native-ios-launch-arguments';
console.warn(getLaunchArguments()); // Array of app launch arguments