Questions tagged [react-native-config]
42 questions
0
votes
0 answers
react-native-config: cannot find symbol
I've got a fresh React Native app, where I'm trying to use react-native-config:
npx react-native init RNConfigDemo
cd RNConfigDemo
yarn add react-native-config
echo "SOME_VAR="something"" > .env
I tried to add a line in my…

Nick Bull
- 9,518
- 6
- 36
- 58
0
votes
1 answer
How to use react-native-config with a react native app build with Swift
I am trying to use the react-native-config with react-native configured with Swift.
Following the usage guide, it tells me to import #import "ReactNativeConfig.h".
I imported this inside of the bridging header, but it can't find it.
Does anyone know…

R. de Ruijter
- 513
- 5
- 13
0
votes
0 answers
What is the best way to handle the use of staging or production API root url in a React Native app?
Say I have a staging API url and a production API url. What is the best way to setup the app to use the production API url when I want to release a build to the stores and the staging API url when I am running in debug mode and just uploading to…

Hols
- 361
- 1
- 5
- 21
0
votes
1 answer
How to fix JSON value '' of type NSNull cannot be converted to NSString in iOS react-native-config and AsyncStorage?
I'm having problems with react native config and AsyncStorage, where null data from .env is not readable on iOS,
below is my code:
_authAsync = async () => {
const userToken = await syncStorageA.getItem(Config.ACCESS_TOKEN)
…

zidniryi
- 1,212
- 3
- 15
- 36
0
votes
1 answer
How to manage react-native .env variables with PhpStorm Run/Debug Configuration?
I am using PhpStorm and trying to automate the run with specific env variable. Managing .env variables for dev, staging, prod is very time saving and safe. So when I run set ENVFILE=.env.staging && react-native run-android from terminal, it picks…

Razib Hossain Shuvo
- 29
- 1
- 12
0
votes
1 answer
React native Config - Setting .env
I am using react-native-config for setting environment variable in my react native project. I have a local image url in my .env config file. I am able to get the local image url in my component using Config.LOGO_URL. Code snippets of files are…
0
votes
1 answer
react-native-config change .env file path from root to other folder
I use from react-native-config in my project and my .env file exist in a sub folder rather than root path.
In build.gradle file i have:
project.env.get("APP_VERSION_CODE").toInteger()
but when i run the app:
* What went wrong:
A problem occurred…

hossein ketabi
- 480
- 7
- 19
0
votes
2 answers
Using react-native-config with fastlane
currently in my react-native app I configure two lanes using fastlane: beta and production. I'm using react-native-config for different environment configs (stored in 2 files: .env.beta and .env.production). How can I let fastlane know which env…

sonlexqt
- 6,011
- 5
- 42
- 58
0
votes
1 answer
Upgrade ReactNative to 0.55.4 and android build compile with error
The build is failing after updating project to RN ^0.55.4
Seems like the problem is relating with the react-native-config dependency Android BuildVersion 23.0.1
The android bin is deprecated and we'll use sdkmanager instead.
$…

Francis Rodrigues
- 1,470
- 4
- 25
- 61
0
votes
3 answers
react-native-config unable to use env variables in build.gradle
I have react-native-config set up and use it in javascript no problem but am unable to use it like this in build.gradle.
release {
if (project.hasProperty('MYAPP_RELEASE_STORE_FILE')) {
storeFile…

acharlop
- 309
- 4
- 12
0
votes
2 answers
Using react-native-config with babelRelayPlugin with remote graphql schema
My react native code was working fine till yesterday, but today while I was trying to compile the code I am getting this strange error.
node /Users/aragorn/relay-react-native-app/node_modules/react-native/local-cli/cli.js bundle --entry-file…

Harkirat Saluja
- 7,768
- 5
- 47
- 73
-1
votes
2 answers
React-native [Axios Error: Network Error]
I want to fetch API from my 'https://localhost:7262/api' address, but that is giving
Network Error. I want to do GET request and then i am going to do POST request. Also my API server is always open during work.
What Are Your Recommendations?
I…