Previews
XCODEPROJ-COMPATIBLE
This feature is compatible with raw Xcode projects.
REMOTE PROJECT REQUIRED
This feature requires a remote project.
When building an app, you may want to share it with others to get feedback. Traditionally, this is something that teams do by building, signing, and pushing their apps to platforms like Apple's TestFlight. However, this process can be cumbersome and slow, especially when you're just looking for quick feedback from a colleague or a friend.
To make this process more streamlined, Tuist provides a way to generate and share previews of your apps with anyone.
DEVICE BUILDS NEED TO BE SIGNED
When building for device, it is currently your responsibility to ensure the app is signed correctly. We plan to streamline this in the future.
tuist build App # Build the app for the simulator
tuist build App -- -destination 'generic/platform=iOS' # Build the app for the device
tuist share App
xcodebuild -scheme App -project App.xcodeproj -configuration Debug # Build the app for the simulator
xcodebuild -scheme App -project App.xcodeproj -configuration Debug -destination 'generic/platform=iOS' # Build the app for the device
tuist share App --configuration Debug --platforms iOS
tuist share App.ipa # Share an existing .ipa file
The command will generate a link that you can share with anyone to run the app – either on a simulator or an actual device. All they'll need to do is to run the command below:
tuist run {url}
tuist run --device "My iPhone" {url} # Run the app on a specific device
When sharing an .ipa
file, you can download the app directly from the mobile device using the Preview link. The links to .ipa
previews are by default public. In the future, you will have an option to make them private, so that the recipient of the link would need to authenticate with their Tuist account to download the app.
PREVIEWS' VISIBILITY
Only people with access to the organization the project belongs to can access the previews. We plan to add support for expiring links.
Tuist macOS app
Tuist
DownloadTo make running Tuist Previews even easier, we developed a Tuist macOS menu bar app. Instead of running Previews via the Tuist CLI, you can download the macOS app. When you open a Preview link in the browser, the app will automatically launch on your currently selected device.
REQUIREMENTS
To download Previews, you need to first authenticate with the tuist auth
command. In the future, you will be able to authenticate directly in the app.
Additionally, you need to have Xcode locally installed.
Pull/merge request comments
INTEGRATION WITH GIT PLATFORM REQUIRED
To get automatic pull/merge request comments, integrate your remote project with a Git platform.
Testing new functionality should be a part of any code review. But having to build an app locally adds unnecessary friction, often leading to developers skipping testing functionality on their device at all. But what if each pull request contained a link to the build that would automatically run the app on a device you selected in the Tuist macOS app?
Once your Tuist project is connected with your Git platform such as GitHub, add a tuist share MyApp
to your CI workflow. Tuist will then post a Preview link directly in your pull requests:
Automations
You can use the --json
flag to get a JSON output from the tuist share
command:
tuist share --json
The JSON output is useful to create custom automations, such as posting a Slack message using your CI provider. The JSON contains a url
key with the full preview link and a qrCodeURL
key with the URL to the QR code image to make it easier to download previews from a real device. An example of a JSON output is below:
{
"id": 1234567890,
"url": "https://cloud.tuist.io/preview/1234567890",
"qrCodeURL": "https://cloud.tuist.io/preview/1234567890/qr-code.svg"
}