appconfig
npm install react-native-mdm-configSimplest 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
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.
``sh`
npm install react-native-mdm-config
`js
import { getManagedConfig } from 'react-native-mdm-config';
// ...
const managedVars = getManagedConfig();
`
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'`- Development workflow
- Sending a pull request
- Code of conduct
MIT
---
Made with create-react-native-library