Bringing Tuist Previews forward

Tuist Previews is an initiative to make the feature production ready with all the bells and whistles that companies need to adopt the feature.

About

Why

Testing out the app is an important piece of the development cycle. The sooner a bug is caught, the easier it is to find the issue and fix it. But often, testing is done by QA team using nightly builds – wouldn’t it be great if you could generate a preview link, built from arbitrary branch, and share it across your organization and anybody could check out the latest changes using the Tuist CLI, a macOS menu bar app, or directly from their mobile device?

That’s exactly what Tuist Previews are about.

Goals of this initiative

While we have already shipped an initial iteration of the feature, there’s still a lot we need to do to make it more appealing for organizations to adopt.

The list of features that we consider necessary for this initiative to be successful is:

  • Slack integration – organizations should be able to get Previews directly in their Slack workspaces
  • Public and private device builds – anybody should be able to install signed builds on their real devices. We should explore making the signing of the app and registering individual devices easier.
  • Preview metadata – when opening a preview link, I should be able to see the metadata about the preview such the bundle identifier, which platforms it supports, etc.
  • Automatically share previews from tuist build. Users should be able to download the tuist build previews from the command run detail.
  • Downloading latest previews – getting the latest build from the main branch should be one command or one click away. We should make the latest builds available in the dashboard, CLI, and the macOS menu bar.
  • The main Apple platforms should be supported – including Appclips, watchOS apps, etc.
  • Link expiry – organizations should be able to specify how long a preview should be valid for. This is especially crucial for larger organizations with stricter security rules.
  • Easy access to previews from the comments posted by the GitHub app.

If there’s anything missing that you would find useful, let us know in the comments and we will consider

3 Likes

Here’s an (overdue) initiative update:

Progress made

Slack integration

We decided that a full Slack integration is not worth the investment – for now. The primary flow that we want to enable is:

  • A PR is created or updated
  • As part of the CI flow, tuist share is run
  • A Slack message is posted in a given channel

For posting the Slack message, CI providers usually already provide a solution. So, instead of rolling our own Slack app, we decided to instead add a --json flag for tuist share that can be used for any automations that you might wanna do with the links we provide. See more about that here. We will be working with organization to validate how this flow fits into their workflows and will adjust our strategy if necessary.

UI updates

Thanks to the amazing work of fooyodo, we now show whether devices are connected (connected or disconnected) and how they are connected (usb or network) in the macOS app:

Here’s an image with the app before the contribution was merged:

AppClips and watchOS apps

AppClips and watchOS apps are now fully supported :tada:

QR Codes

The Tuist GitHub app now comments a QR code when you share an .ipa file that can be downloaded on physical devices:

What’s next

There are two major features that we will focus on next:

  • Downloading latest previews – getting the latest build from the main branch should be one command or one click away. We should make the latest builds available in the dashboard, CLI, and the macOS menu bar.
  • Preview metadata – when opening a preview link, I should be able to see the metadata about the preview such the bundle identifier, which platforms it supports, etc. Our new design system is in progress, so we will most likely go with the design proposed by @ajkolean before aligning with the new design system once ready cc @asmit.

Hey :wave:

This week we focused on running latest previews:

Progress made

CLI

The tuist run command now supports running specific previews based on a specifier:

tuist run App@latest # Run latest preview from your default branch
tuist run App@feature-branch # Run preview from a specified branch
tuist run App@9691eb7c06a79fa81b66d7870b2762aaa507dce3 # Run preview from a specific commit

macOS app

The macOS app now lists all your apps that have a preview shared from your default branch:
image

You don’t have to manually add the apps you need – Tuist takes care of that for you!

We updated the CLI and the server to upload the app icon. We will be able to use the icon in the app detail in the dashboard.

What’s next

Next week, we’ll focus on showing the app’s metadata when viewing the preview in your browser. We will also start working on surfacing a list of all your previews in the dashboard.

1 Like