Skip to content

[HOLD for payment 2022-12-20] [$500] Allow native app releases to take staging env variables into consideration #11561

Description

@mountiny

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

  1. On native mobile App (iOS and Android), the staging API toggle is turned on
  2. The API requests are still made to production API endpoints

Expected behaviour

  1. On native mobile App (iOS and Android), the staging API toggle is turned on
  2. 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.

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.EngineeringInternalRequires API changes or must be handled by Expensify staffReviewingHas a PR in reviewWeeklyKSv2

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions