This is pretty complex to explain in details.
But basically, we have an app that is allow our customer to manage their employees. The app main flow is written in Swift already.
But each customer have different / unique business model that they require the app to allow them have some custom pages to input their complex data beside the main flow (which is written in Swift)
Let's say the current flow for managing a flow data will look like this in our core app: Page A -> Page B -> Page C
And they want something like: Page A -> Custom Page A.1 -> Page B -> Custom Page B.1 -> Page C
And every customers have different flow and UI. That's why we're creating our own framework that allow customer to embed their own developed UI via Javascript (React Native), which will generate a virtual DOM and render the native UI for their custom pages.
The idea is very similar with this: https://github.com/microsoft/react-native-code-push The only difference is we don't use this to push code changes for our main flow, but for each customer, after they login will have additional flow (custom pages) we need to show. So these javascript files will be downloaded remotely after the user is login, and we will run these javascript files to generate their custom forms (base on React native framework).
On technical perspective, it's seem possible so far. The only problem is we don't know if Apple allow such implementation or not. But I don't think this will violate Apple's policy since the javascript will only generate virtual DOM that will generate dynamic UI.