React Native (Non-Expo)
A step-by-step guide to exporting a build of your React Native app to Waldo.
Exporting an React Native 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:
- 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. - 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
. - If
waldo add
finds an existing configuration file, it uses that. Otherwise, it creates an empty configuration file in the current working directory. - 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.
- 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:- If your React Native app supports building for both Android and iOS, it asks you which build platform it should use.
- If the chosen build platform defines more than one build mode, it asks you which build mode it should use.
- 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.
- 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:
- It verifies that you are authenticated to access Waldo.
- It looks up the “myapp” recipe in the configuration file.
- It then generates the actual build>> (using
xcodebuild
in this case).
The waldo upload
command performs the following actions:
- It verifies that you are authenticated to access Waldo.
- It looks up the “myapp” recipe in the configuration file.
- It then attempts to find the build artifact (the
.app
file in this case) generated by the precedingwaldo build
action. - 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 thewaldo build
andwaldo 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:
Updated 3 months ago