0

Hi i'm using React Native Code Push currently.

Currently my code is manually handling it because of the need to prevent it from codepushing builds that are in the staging / testing environment. I had a problem earlier when i did a release build for testing, it still picked up the codepush and it refreshed incorrectly.

What is everyone else doing? I can make the codepushoptions on app resume but it'd still pick up the codepush bundle on my staging environments when i only want it on production :/

I considered the staging, and production environments in codepush but that part is quite confusing. not sure if its used at all.

let codePushOptions = { checkFrequency: codePush.CheckFrequency.MANUAL };

And in the code

if ((!(__DEV__)) && (API_BASE_URL === 'https://production.xxx')) {   // only run in production

    codePush.sync({
      updateDialog: null,
      installMode: codePush.InstallMode.ON_NEXT_RESTART
    },  

1 Answers1

0

eh i found that i'd just set different keys per environment and codepush will handle that way.

https://www.youtube.com/watch?v=waatVm6-bX4