Installing 'dev' and 'production' builds simultaneously, and Google

Please provide the following:

  1. SDK Version: 36.0.0
  2. Platforms(Android/iOS/web/all): Android

I would like to have standalone builds for two release channels installed simultaneously (ie. the “market” build, and a “dev” build). I think I can make this happen by modifying the package name before building, but that will break Google sign in Oauth redirectUrls. Is there a good way to handle this?

I’ve not tried GoogleSignIn yet, but I think some work being done by the Expo team might be relevant to what you’re trying to do:

They have been adding support for an app.config.js that can be used to tweak app.json when building/publishing. I think the latest changes have not yet been released and I’m not sure what is left to do, but see this pull request for an example of how it could be used.

That should allow you to modify the package name and anything else you might need based on an environment variable. (e.g. expo.ios.config.googleSignIn.reservedClientId).

If you need to change anything in your code based on the “market”/“dev” version, one way you could do it is add the necessary info to expo.extra in your app config which you should be able to access as Constants.manifest.extra.yourCustomValue.

Would that take care of the redirect URL issue?

Thanks for the response.

I’m aware of the app.config.js work; I’m currently using a homegrown script to generate a custom app.json before building/publishing for “dev” – so the problematic part isn’t customizing the package or even passing that customization into code.

The problem is that Google’s oauth redirect url uses the package name as the prefix and that this is verified on Google’s end; so if you customize the package name for “dev”, then you cannot receive the redirect url (which is pegged to the “market” version). However you cannot install two versions with the same package name simultaneously. My question is whether someone has found a way out of this.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.