react-native-sandbox-checker is module for recognizing Sandbox environment at iOs platform only.
$ npm install react-native-sandbox-checker --save
$ react-native link react-native-sandbox-checker
- In XCode, in the project navigator, right click
Libraries
➜Add Files to [your project's name]
- Go to
node_modules
➜react-native-sandbox-checker
and addRNSandboxChecker.xcodeproj
- In XCode, in the project navigator, select your project. Add
libRNSandboxChecker.a
to your project'sBuild Phases
➜Link Binary With Libraries
- Run your project (
Cmd+R
)<
import { isSandbox } from 'react-native-sandbox-checker';
// ...
if (isSandbox()) {
// Do your business here
}