Strategies for app flavors and IAP

Hi,

so far we use two flavors for our app staging and production so that we can install a new test version in parallel to our current production app.
While adding IAP now we are facing the problem, that IAPs are bound to the applicationId so I can’t build staging versions that use the defined products of the production release.

How are you dealing with that? Do you create a separate staging app in the play store console that matches the applicationId of the staging build?
What other options are there?

That’s exactly what I do. In my projects I typically have multiple environments with configuration fields for product identifiers among other things such as API keys. Dart definitions are helpful here, either as base64 strings or using the JSON file affordance.

We now decided no longer to use Flavors but only to configure the app build via dart-defines or via Firebase remote config so that we always use the same applicationID and only switch the used backend URLs. It seems the best way at the moment with IAP

Hi! We always divided the flavor environments for Apple Store and Play Store. Maybe at the beginning of the project, you need to set up redundant stuff(ex, products for iap) for them. But in the long term, we can benefit from clear data and operational analytics. We can quickly locate the points and issues we are interested in. However, it still depends on the practices of every team.

1 Like

Yes, we have 2 apps in Google Play and AppStore Connect, each with mirroring configuration. The TST apps are not getting released or submitted to review to not trigger duplicate app warning, i.e. they always stay in internal testing tracks, do not have external testers.

It takes a while to setup products, entitlements etc. but once it’s done it’s much easier for testing.

2 Likes

Yes, it seems the way to go. After more discussions with our backend team we will do that now too so that we can cleanly separate the backend webhooks from stores and test independently.
It is annoying that the stores don’t support a concept of staging versions in any way.

Is there a way to copy an existing app in the stores or do I have to manually duplicate it?

It’s a manual process

1 Like

I guess you could use the store API but setting that up would be more hassle than setting them up manually