feat(managed-config): Add Managed Config plugin (@config-plugins/mana…#228
Open
gvanderclay wants to merge 1 commit intoexpo:mainfrom
Open
feat(managed-config): Add Managed Config plugin (@config-plugins/mana…#228gvanderclay wants to merge 1 commit intoexpo:mainfrom
gvanderclay wants to merge 1 commit intoexpo:mainfrom
Conversation
39f0e78 to
8d49fdf
Compare
8d49fdf to
d3c67df
Compare
ddekkers
reviewed
May 9, 2024
ddekkers
left a comment
There was a problem hiding this comment.
In order to compile the module correctly to js, path and fs should be named imports, I think
Comment on lines
+7
to
+8
| import fs from "fs"; | ||
| import path from "path"; |
There was a problem hiding this comment.
Suggested change
| import fs from "fs"; | |
| import path from "path"; | |
| import * as fs from "fs"; | |
| import * as path from "path"; |
Comment on lines
+8
to
+9
| import fs from "fs"; | ||
| import path from "path"; |
There was a problem hiding this comment.
Suggested change
| import fs from "fs"; | |
| import path from "path"; | |
| import * as fs from "fs"; | |
| import * as path from "path"; |
elevate-doug
approved these changes
Aug 28, 2024
|
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.