javascriptreact-nativeexpomdmintune

Access Intune configuration settings in a React Native application?


My company is doing Mobile Device Management with Microsoft Intune. We've successfully deployed an internal iOS app (using the Apple Developer Enterprise Program).

With Intunes' configuration settings we're trying to make each user's individual email available to the mobile app. https://learn.microsoft.com/en-us/mem/intune/apps/app-configuration-policies-use-ios

How do you normally access these types of settings in an app? I found this library but I'd need to eject from Expo which is not ideal for me: https://github.com/robinpowered/react-native-mdm


Solution

  • You can add expo support into react-native-mdm by fork react-native-mdm and use Config Plugins

    here is the PR for adding expo support into the native package https://github.com/Shobbak/react-native-compressor/pull/62

    After adding support you just have to do

    Managed Expo

    yarn install react-native-mdm_from_your_fork
    

    Add the react-native-mdm plugin to your Expo config (app.json, app.config.json or app.config.js):

    {
      "name": "my app",
      "plugins": ["react-native-mdm"]
    }
    

    Finally, compile the mods:

    expo prebuild
    

    To apply the changes, build a new binary with EAS:

    eas build