How use flavors with SDK

  • 1 October 2021
  • 6 replies

Badge +1

Is it possible to use the RevenueCat SDK with different flavors of the same app?

6 replies

Userlevel 3
Badge +8

Hi @Código Base,

Can you explain what you mean by flavors? Are you referring to Flutter flavors? We’ve seen this in the past, such as a production and a development flavor, and usually these are set up as two different RevenueCat apps in the same account (each flavor would use its own API key). 

Badge +1

Exactly, I was referring to what you are saying. I understand then that it would also have to have an app in the stores (Google Play and App Store) for each of the flavors, right?

Userlevel 1
Badge +7

We have 2 flavors for our Flutter app (20-60 purchases a day), and are using a Single RevenueCat app for managing this. It’s “ok” because you can still view Sandbox purchases for a test user.

However, we’re considering creating a separate RevenueCat “app” for our staging environment just to keep it clean. I’m still not sure if it’s worth the effort though yet.

We have a TestFlight for our staging app separate too our published Live app, which means you manage products on each. I think for our Android environment we just have one app but have a bunch of test products and live products. 

Will be interesting to hear what you go with.

Badge +1

How do you use 2 flavors with the same app? In our case, each flavor has a different package id. DEV -, STG -, PRO - 

Userlevel 2
Badge +6

Very interested in this too. As Codigo Base was saying, our flavours have different package IDs so not sure how this works. 

Userlevel 5
Badge +9

You’ll at least need a unique RevenueCat app for each bundle ID / package ID since those are treated as separate apps by Apple / Google as far as in-app purchases are concerned. Some developers choose to create multiple RevenueCat apps for different environments of the same bundle ID as well.