Questions tagged [react-native-config]
42 questions
18
votes
3 answers
Use .env variables to set up appcenter on a react-native app
I started using MS appcenter in my bare react-native app, and during the set up they ask me to add two new files to the project:
For IOS: AppCenter-Config.plist with
AppSecret
…

Victor
- 5,043
- 3
- 41
- 55
15
votes
6 answers
PhaseScriptExecution failed for react-native-config on XCode build
I am trying to build my React Native project on Xcode and it is failing. The build target is react-native-config with the error: Run custom shell script '[CP-User] Config codegen' "Command PhaseScriptExecution failed with a nonzero exit…

zosozo
- 393
- 2
- 5
- 16
4
votes
0 answers
How to define variants in Android Studio for development and release application for React Native application
I use react-native-config for changing between production and development environments.
I can switch environments dev/prod (bundler identifier, appIcon, splashScreeen, appName, ..) base on the scheme for IOS
for dev:
ENVFILE=.env npx react-native…

Petrik-a-dost
- 223
- 4
- 11
3
votes
2 answers
Pass env file to detox
I would like to pass environment variable when I run detox tests in my react-native app:
"ios.sim.debug": {
"binaryPath": "ios/build/Build/Products/Debug-iphonesimulator/myapp.app",
"build": "export IS_DETOX=true && xcodebuild -workspace…

GChevass
- 205
- 3
- 9
2
votes
0 answers
React Native & AWS Client STS
I am trying to get cross account credentials for AWS Client Secret Manager by calling main function in the file.
I am getting an error saying Error: Credentials Missing
I tried everything, except for putting the credentials and storing them on my…

Nata Vacheishvili
- 387
- 1
- 5
- 18
2
votes
0 answers
react-native-config use env inside .json file located at android folder
Documentation contains example for android native usage only for .xml and java classes. I'm having file 'msal_config.json' located at android/app/src/main/assets folder. Is there any way for me to access env's inside .json file?
For e.g my env is…

Chewiex
- 591
- 1
- 4
- 6
2
votes
1 answer
react native config cannot read env file in ios
I have follow the doc: https://github.com/luggit/react-native-config#ios
until: Availability in Build settings and Info.plist
step 6. create new build phase for the scheme which will generate "tmp.xcconfig" before each build exposing values to Build…

phon sokserey
- 51
- 1
- 7
1
vote
0 answers
React Native Config Not Picking Up .env Changes
My react-native-config isn't picking up changes in my .env
Only when I uninstall and then reinstall does react-native-config pick up the changes in my .env file.

derekbailinkedin
- 61
- 1
1
vote
1 answer
react native staging in android
I am trying to get flavors or build variants running in android for my react-native project.
Via Schemes I got the same running on iOS, but Android does not want to follow. I guess something I am doing wrong.
Steps that I took so far (all in a fresh…

Fapi
- 323
- 2
- 15
1
vote
0 answers
How to use the fastlane action `environment_variable `
According to the document of action environment_variable.
I've tried to use it this way in my Fastfile but failed.
environment_variable(set: { ENVFILE: ".env.dev" }) # failed
I can not find any example of how to use this action.
I also look…

ryn.xiao
- 9
- 4
1
vote
0 answers
[Android][react-native-config] Getting correct .env with productFlavors
I did as the document with .env file picker like this
project.ext.envConfigFiles = [
debug : ".env",
release : ".env.production",
adhoc : ".env.test",
asiaRelease :…

Khoa Luu
- 125
- 4
1
vote
1 answer
react native config: Activity class dose not exists
I set a file .env.devdps
APP_NAME=TestDps
just use APP_NAME in AndroidManifest.xml
In my android/app/build.gradle
defaultConfig {
...
resValue "string", "build_config_package",…

Morton
- 5,380
- 18
- 63
- 118
1
vote
0 answers
react native packages install for Android
I've been using React Native for a little while now and I've always struggled with some of the gradle stuff for the Android side of things. Since 0.60.0 the iOS side has been great with using the pod file.
I have started to use a package for SQLite…

Matt Leach
- 839
- 3
- 10
- 15
1
vote
0 answers
Per-environment config in create-react-native-app
I have an app that I created using create-react-native-app. I'm trying to use react-native-config to manage config variables that differ between dev and production.
This requires the following steps, which depend on Xcode. Is there any way to do…

Jim Greer
- 421
- 1
- 4
- 5
1
vote
2 answers
Views looks different in react native for android and ios
I am creating an app on react-native but views look different in both android and ios.
Views are fine on android but on ios they look different. Can you look into sample component and let me know where I am doing wrong or how can I make both views…

Adnan Ali
- 2,890
- 5
- 29
- 50