react-native-mdm
react-native-mdm copied to clipboard
How to use this?
The README does not mention how this library can be used. What kind of object will data in
MDMDidUpdate(data)
be ?
Is it a dictionary?
@jhontech32
I wrote a bit on medium how I used MDM, maybe it helps you https://watermelonson.medium.com/how-to-add-mdm-support-for-ios-apps-in-react-native-341ad2bfacd4
I haven’t used android for it, sorry!
I used a wrapper around my app
<MDMConfig>
<AppNavigator />
</MDMConfig>
and inside this wrapper, I have something like this
import MobileDeviceManager from 'react-native-mdm';
const MDMConfig = ({ children }) => {
...
useEffect(() => {
if (appInit) {
mdmConfigHandler();
}
}, [appInit]);
return children;
};
const mdmConfigHandler = async () => {
try {
const supported = await MobileDeviceManager.isSupported();
...
const mdmConfig = await MobileDeviceManager.getConfiguration();
...
} catch (e) {
...
}
};
It works for both Android and iOS
Does this work with Intune?