Issue
[ I want the app to fetch and download the bundle kept on a remote server ]
Explanation:
I want to create an app which will have minimum feature for users. If user wants to add more features later, then they can just download it from install menu of the App and the code/sdk will be downloaded from the server and it will be available for that particular user.
Example 1: I have a Calulator app and by default it has an add and subtract feature. Also It has installable features like multiplication and division. so when user will install any of these then it will download the code/sdk and it will be available for that user. (Refer the snap)
Example 2: Downloading game MAP or character inside the Game App (call of duty / PUBG)
Acceptance criteria:
- code should not be added/bundled with a conditional statement inside the ipa or apk with initial release.
- can not use web view
Any kind help or hints to implement the feature would be really nice. :)
Solution
Yes it is totally possible by using RE.Pack and Module federation.
In this case you can develop "Multiple number" and "divide number" features independently using @callstack/repack and deploy them in a remote server and you can access them from your container app.
short intro :
Module Federation was first introduced in Webpack 5. It’s a functionality that allows code-splitting and sharing the split code parts (chunks) between loosely coupled applications. It also helps distributed teams to ship large applications faster. And, along with its latest update, Re.Pack 3 supports this functionality out of the box. Module Federation is one of the approaches to creating Micro-frontends architecture for your application which makes the functionality a great ally for creating features on demand.
Reference :
Step by step guide
Answered By - Avinash
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.