-
Notifications
You must be signed in to change notification settings - Fork 127
feat(managed-config): Add Managed Config plugin (@config-plugins/mana… #228
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
39f0e78 to
8d49fdf
Compare
8d49fdf to
d3c67df
Compare
ddekkers
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In order to compile the module correctly to js, path and fs should be named imports, I think
| import fs from "fs"; | ||
| import path from "path"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| import fs from "fs"; | |
| import path from "path"; | |
| import * as fs from "fs"; | |
| import * as path from "path"; |
| import fs from "fs"; | ||
| import path from "path"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| import fs from "fs"; | |
| import path from "path"; | |
| import * as fs from "fs"; | |
| import * as path from "path"; |
|
hi @gvanderclay, are you going to reply/fix ddeckers review? |
|
hi @gvanderclay, I've tried your plugin it does great job updating AndroidManifest.xml and creating app_restrictions.xml, but when i'm trying to use it with react-native-emm i'm getting this error on AES: were you able to run EXPO 52 with emm? are there any more changes one should do in order to make it work with EXPO? Thanks 🙏 -- edit |
Why
The motivation behind this PR is to provide Expo developers with a way to configure their apps for Mobile Device Management (MDM) solutions. Managed are used in apps deployed in enterprise environments, allowing IT administrators to remotely manage and configure settings within an app for users within their organization. It can be complimented with
react-native-emmorreact-native-mdmto integrate MDM features.This PR introduces the @config-plugins/managed-config to @expo/config-plugins to allow MDM configuration support without being tied to a specific library.
Relevant issues and requests:
How
The
@config-plugins/managed-configplugin was developed following the Expo Config Plugin system's guidelines, leveraging the Android Managed Configurations XML resource file to declare app restrictions. It parses a given set of restrictions defined in theapp.jsonorapp.config.jsunder the plugin options and generates the corresponding XML file at build time, which is then included in the final Android app bundle.The plugin supports all documented restriction types (e.g.,
bool,string,integer,choice,multi-select,hidden,bundle, andbundle_array).Test Plan
The plugin has been thoroughly tested with a series of unit tests covering each restriction type (
bool,string,integer,choice,multi-select,hidden,bundle,bundle_array). These tests validate the XML generation logic, ensuring that the output matches the expected configuration for a given set of restrictions.Additional manual testing was performed using the
apps/appproject and validating that theapp_restrictionsfile was added, and the android manifest was modified correctly.