Flutter

A step-by-step guide to exporting a build of your Flutter app to Waldo.

Exporting a Flutter emulator/simulator build with Waldo CLI

If you haven’t yet installed Waldo CLI, simply follow the instructions here.

Once you have verified that Waldo CLI is correctly installed, exporting an Android emulator build of your app can be as simple as typing two commands into your terminal window.

Adding a recipe

Here’s the first command:

waldo add myapp

The waldo add command performs the following actions:

  1. It first verifies that you are authenticated to access Waldo. If you did not authenticate when you installed Waldo CLI, you can do so at any time with the waldo auth command.
  2. It then searches the current working directory (and its parent directories if necessary) for a configuration file named config.yml in a hidden directory named .waldo.
  3. If waldo add finds an existing configuration file, it uses that. Otherwise, it creates an empty configuration file in the current working directory.
  4. It then attempts to add a recipe named “myapp” to the configuration file (assuming a recipe with that name does not already exist). The name “myapp” is arbitrary. You can name your recipe pretty much anything you want.
  5. If waldo add determines that there is more than one way to generate a build in the current working directory (or one of its descendent subdirectories), it interactively asks you a series of multiple choice questions to construct the recipe:
    1. If your Flutter app supports building for both Android and iOS, it asks you which build platform it should use.
    2. If the chosen build platform defines more than one build flavor, it asks you which build flavor it should use.
  6. It then determines which Android or iOS app configurations you have access to in Waldo and asks you which one it should associate with this recipe.
  7. Finally, waldo add displays the resulting recipe and asks you to confirm that it should add the recipe to the configuration.

Once you have added a particular recipe to the configuration file, you need not do it again. If you save the Waldo CLI configuration file in your source code repository, any one with access to the repository can make use of your recipe(s).

Building and uploading

Here’s the second command:

waldo sync myapp

The waldo sync command is simply a shorthand for the waldo build command followed by the waldo upload command.

The waldo build command performs the following actions:

  1. It verifies that you are authenticated to access Waldo.
  2. It looks up the “myapp” recipe in the configuration file.
  3. It then generates the actual build>> (using xcodebuild in this case).

The waldo upload command performs the following actions:

  1. It verifies that you are authenticated to access Waldo.
  2. It looks up the “myapp” recipe in the configuration file.
  3. It then attempts to find the build artifact (the .app file in this case) generated by the preceding waldo build action.
  4. Finally, if it finds the previous build artifact, waldo upload attempts to send it to Waldo.

📘

Tip: If you have only one recipe defined in your Waldo configuration, you can omit the recipe name from the waldo sync command (as well as the waldo build and waldo upload commands).

That’s it! See waldo help and waldo help <command> for more information about what you can do with Waldo CLI.

Troubleshooting

If you encounter trouble while uploading a new build of your application to Waldo, you can refer to the following: