Expensify / App

Welcome to New Expensify: a complete re-imagination of financial collaboration, centered around chat. Help us build the next generation of Expensify by sharing feedback and contributing to the code.
https://new.expensify.com
MIT License
3.49k stars 2.84k forks source link

[$250] Set HybridApp Testflight environment to staging #51193

Open puneetlath opened 5 hours ago

puneetlath commented 5 hours ago

Right now, when you use the HybridApp Testflight app, it is treated as a production app. This means our debugging tools are not available to use. Ideally, we should make it so that the HybridApp testflight is treated as a staging app. Just like the NewExpensify staging app is. That way we'll have access to the debug mode and various debugging tools.

cc @AndrewGable @staszekscp

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021848496225680121076
  • Upwork Job ID: 1848496225680121076
  • Last Price Increase: 2024-10-21
Issue OwnerCurrent Issue Owner: @
melvin-bot[bot] commented 5 hours ago

Triggered auto assignment to @VictoriaExpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

AndrewGable commented 5 hours ago

Code in question is here: https://github.com/Expensify/App/blob/main/src/libs/Environment/getEnvironment/index.native.ts#L32-L36

situchan commented 4 hours ago

Happy to review this as C+ since this bug I've been reviewing is related this one.

VictoriaExpensify commented 59 minutes ago

Thanks @situchan - assigned.

melvin-bot[bot] commented 59 minutes ago

Job added to Upwork: https://www.upwork.com/jobs/~021848496225680121076

melvin-bot[bot] commented 59 minutes ago

Current assignee @situchan is eligible for the External assigner, not assigning anyone new.

NJ-2020 commented 44 minutes ago

Proposal

Please re-state the problem that we are trying to solve in this issue.

Set HybridApp Testflight environment to staging

What is the root cause of that problem?

Currently we return the production environment if it's hybrid app https://github.com/Expensify/App/blob/36805e286724df673497dafa6c57eeafceb69fa0/src/libs/Environment/getEnvironment/index.native.ts#L33-L36

What changes do you think we should make in order to solve the problem?

We should return the staging environment CONST.ENVIRONMENT.STAGING instead of production

if (NativeModules.HybridAppModule) {
    environment = CONST.ENVIRONMENT.STAGING;
    return;
}

What alternative solutions did you explore? (Optional)