We are trying to set a e2e test suite, but struggling to get the environment variables working (when testing).
Currently, we have a managed expo project (ios/android folders being created with expo run:'platform') with some environment variables being set on app.config.js (from .env file).
When we build locally using expo run:ios, for example, the variables work just fine.
The issue is when we generate the build for being used on the e2e tests.
In this case, app.config.js has undefined variables.
The command we are using for generating the .app file is this one: xcodebuild -workspace ios/detoxexpoblank.xcworkspace -scheme detoxexpoblank -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build | npx excpretty ./
We are looking for a way to attach the environment variables on the generated build.
We tried adding require('dotenv').config() on the test files, but that doesn't work either.
Hello.
We are trying to set a e2e test suite, but struggling to get the environment variables working (when testing).
Currently, we have a managed expo project (ios/android folders being created with expo run:'platform') with some environment variables being set on app.config.js (from .env file).
When we build locally using
expo run:ios
, for example, the variables work just fine. The issue is when we generate the build for being used on the e2e tests.In this case, app.config.js has undefined variables.
The command we are using for generating the .app file is this one:
xcodebuild -workspace ios/detoxexpoblank.xcworkspace -scheme detoxexpoblank -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build | npx excpretty ./
We are looking for a way to attach the environment variables on the generated build.
We tried adding require('dotenv').config() on the test files, but that doesn't work either.
Any help would be really appreciated.
Thanks