I usage --config, but now is deprecated. How can I do?

Please provide the following:

  1. SDK Version: 43
  2. Platforms(Android/iOS/web/all): Android + iOS
  3. Add the appropriate “Tag” based on what Expo library you have a question on.

Good evening!

I will try to be fast and objective. If it’s possible!

I have an app project that varies across 10 other projects, where the difference is basically in the names, assets, versions and packageNames. When I want to build a variation I use: expo build:android --config “variants/blabla.json”, where “blabla” is the name of the variation. So in this “variants” folder there are 10 more jsons, which are the variations. I know that this format of varying the compilation by the --config flag is deprecated, and that now I have to use app.json to set the variants, but I confess that I didn’t quite understand how to make this variation. Do you have any specific documentation that I haven’t read? Because until then, I only saw instruction to set the variation between dev or prod mode. Pardon my ignorance! Can you help me?

this doc explains how you can migrate: fyi/config-flag-migration.md at main · expo/fyi · GitHub

Thanks friend, I will read this content.
Is it as easy as the previous way?

no problem and good luck, friend!

1 Like

It’s no harder. It’s just a bit different. After you have set up the app.config.js file (there are multiple ways to do this, but two ways are shown in the documentation that Brent pointed you at), instead of doing this:

You do something like this:

APP_ENV=blabla expo build:android

Or if you’re on Windows:

npx cross-env APP_ENV=blabla expo build:android
1 Like

Good morning World! I was forgetting to give a feedback about the help of my friends! It worked here, I can now switch between variants of my app without any problems. To tell the truth I felt like a fool, because it really only changed the way of doing it, but it’s still practical! Thank you @notbrent and @wodin ! Hugs from Brazil! Now, U can close this topic!

1 Like

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