Problem
In this issue #10163, we have implemented a setting toggle which will aim all the API commands to staging or production API (if in Staging App). However, this works only in desktop or web, but not in native mobile apps as the live logs shown.
The reason it does not work is that we always build the App only once for deploy. We just relabel staging release for the production one and so when building the staging App we use the production env variables causing this issue
Actual behaviour
- On native mobile App (iOS and Android), the staging API toggle is turned on
- The API requests are still made to production API endpoints
Expected behaviour
- On native mobile App (iOS and Android), the staging API toggle is turned on
- The API requests will be made to the staging endpoints same as on web app version
Why is it important
This will allow us to test staging changes with staging API at the same time.
Solution
Find a way how we can use the environment variables in native app so we can distinguish between staging and production to send the API requests to desired API endpoints.
Problem
In this issue #10163, we have implemented a setting toggle which will aim all the API commands to staging or production API (if in Staging App). However, this works only in desktop or web, but not in native mobile apps as the live logs shown.
The reason it does not work is that we always build the App only once for deploy. We just relabel staging release for the production one and so when building the staging App we use the production env variables causing this issue
Actual behaviour
Expected behaviour
Why is it important
This will allow us to test staging changes with staging API at the same time.
Solution
Find a way how we can use the environment variables in native app so we can distinguish between staging and production to send the API requests to desired API endpoints.