digidem / mapeo-mobile

Monitor and document the world around you
GNU General Public License v3.0
95 stars 16 forks source link

Es/mapbox token #1148

Open ErikSin opened 3 months ago

ErikSin commented 3 months ago

Created script to generate env variables (to be used by js front end).

updated bitrise.yml to run script in order to access secret key in bitrise

ErikSin commented 3 months ago

@achou11 I actually have tried this library (and a few other config libraries). None of them work with our current archtecture. Dotenv, doesnt work with our version of babel, and upgrading babel, lead to a whole slew of other issues. I also tried react-native-config and that also didn't work.

After playing around with these libraries for several hours, I think the having a prebuild script is the path of least resistance

achou11 commented 3 months ago

@achou11 I actually have tried this library (and a few other config libraries). None of them work with our current archtecture. Dotenv, doesnt work with our version of babel, and upgrading babel, lead to a whole slew of other issues. I also tried react-native-config and that also didn't work.

After playing around with these libraries for several hours, I think the having a prebuild script is the path of least resistance

ah damn - unfortunate but yeah I guess our react native version is quite behind at this point :/

achou11 commented 3 months ago

not sure if more convenient but another idea: we already make use of transform-inline-environment-variables (added to support feature flags) so maybe that can be used for this purpose too? although thinking about the various changes needed to get that working, that may be even harder to maintain 😅

achou11 commented 3 months ago

@ErikSin was able to get react-native-config working - can push up a separate branch if you're interested in the changes

ErikSin commented 3 months ago

@ErikSin was able to get react-native-config working - can push up a separate branch if you're interested in the changes

yesss please!!