flexn-io / renative

🚀🚀🚀 Unified Development Platform for iOS, tvOS, Android, Android TV, Android Wear, Web, Tizen TV, Tizen Watch, Tizen Mobile, LG webOS, macOS/OSX, Windows, KaiOS, FirefoxOS Firefox TV platforms
https://renative.org
MIT License
1.82k stars 181 forks source link

Can we override a file based on environment #1756

Closed youssefali424 closed 3 weeks ago

youssefali424 commented 1 month ago

Like having two files ex: config.dev.xml and config.prod.xml config.dev.xml is used with dev env and replace the current etc same with prod file is there a way to do so ?

RicardasN commented 1 month ago

Pretty sure that is not supported in a way you describe, however there is a very similar feature, which could answer your needs - appConfigs - https://renative.org/docs/overview/introduction#appconfigs. They should allow you to set up multiple flavours of the app and the only thing needed to change when you run will be the addition of -c to run command or any other command you want to call (example npx rnv run -p platform -c appConfig). As you can see in docs it allows configuration of platforms, plugin overrides, asset file injections and more, so hopefully this resolves what you need