Skip to content

Repository files navigation

react-native-mdm-config

Simplest react-native library for accessing application configurations received from MDM.

  • Android: using RestrictionsManager
  • IOS: using react-native built-in Settings class with com.apple.configuration.managed

The initial library code was generated using npx create-react-native-library@latest

Note

If you need more features such as on-change event, consider using https://github.com/mattermost/react-native-emm.

I've created this library because react-native-emm was conflicting with other more maintained Expo libraries such as expo-screen-capture, and to support future Expo versions more easily.

Installation

npm install react-native-mdm-config

Usage

import { getManagedConfig } from 'react-native-mdm-config';

// ...

const managedVars = getManagedConfig();

Testing on Android

  • Use Test DPC to create a work account.
  • Install the apk on that account using adb install (adb install --user 11 android\app\build\outputs\apk\debug\app-debug.apk)
  • In Test DPC, locate "Managed configurations", and add new variables under your application.

Testing on IOS

Use simctl to set variables in the IOS simulator:

xcrun simctl spawn booted defaults write APP_ID com.apple.configuration.managed -dict 'serverUrl' 'https://example.com'

Contributing

License

MIT


Made with create-react-native-library

About

Simplest react-native library for accessing application configurations received from MDM

Topics

Resources

Code of conduct

Contributing

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages