Skip to content

symmetriccurve/ReactBuilds

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 

Repository files navigation

ReactBuilds

Here are couple of ways to point to different Environments with in your React-Native App. Change Approches under the index.ios.js Here : https://github.com/symmetriccurve/ReactBuilds/blob/master/ReactBuilds/index.ios.js#L23

Approach#1

Fetch the Config from a Remote Server. (More Control over the app, and it does not need to re-build the app)

Approach#2

Old School method of chaging the Mode in the JS files here : https://github.com/symmetriccurve/ReactBuilds/blob/master/ReactBuilds/Approach2/Approach2.js#L15

Approach#3

Using import Config2 from 'react-native-config' This Approach is bit of incomplete as it does not pick the .envProb or .envStage files while building it from terminal

Approach#4(As of Now it only works for iOS)

Using Complete independent Native Module(and using React Bridging) on iOS and Android that can figure out the BuildMode from the Xcode(in Case of iOS) and AndroidStudio(in Case of Android).

https://github.com/symmetriccurve/ReactBuilds/blob/master/ReactBuilds/Approach4/Approach4.js#L17

Todo:

1.Fix Approach#3 to Pick . env files

2.Approach#4 Implement React-bridge on Android to Listen BuildModes form Native Land.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published