This is a module that allows entering or exiting Autonomous Single App Mode from a react-native application Currently there is only IOS support.
$ yarn add react-native-asam
$ react-native link react-native-asam
- In XCode, in the project navigator, right click
Libraries
➜Add Files to [your project's name]
- Go to
node_modules
➜react-native-asam
and addAsam.xcodeproj
- In XCode, in the project navigator, select your project. Add
libAsam.a
to your project'sBuild Phases
➜Link Binary With Libraries
- Run your project (
Cmd+R
)<
import { enterSingleAppMode, exitSingleAppMode } from 'react-native-asam';
// To enter single app Mode
enterSingleAppMode();
// To exit single app Mode
exitSingleAppMode();
// To check apps current mode using async/await
const isEnabled = await isSingleAppModeEnabled();