Log in
product

Define your watchOS apps and extensions easily with Tuist 0.19.0

Until today, defining watchOS apps and extensions in Tuist was not possible. The good news is that from Tuist 0.19.0 that's no longer true because it extends its beautifully simplified abstractions to watchOS. On top of that, we also shipped support for enabling test coverage in the schemes, and defining the deployment targets in targets. We also took the opportunity to iron out some bugs that had been reported by users.

Hola Xcoders 👋!

Last week we cut a new version of Tuist, 0.19.0, and this time it's my turn to share what we bundled in that release for you. Let's dive right in.

Support for watchOS apps

Since this version of Tuist you can now define your apps for watchOS. As we've done with other Xcode's intricacines, Tuist takes care of setting up the build phases and build settings for you. The snippet below contains an example of a project that has a watch app and its companion extension.

import ProjectDescription let project = Project(name: "App", targets: [ Target(name: "WatchApp", platform: .watchOS, product: .watch2App, bundleId: "io.tuist.App.watchkitapp", infoPlist: "Support/WatchApp-Info.plist", resources: "WatchApp/**", dependencies: [ .target(name: "WatchAppExtension") ]), Target(name: "WatchAppExtension", platform: .watchOS, product: .watch2Extension, bundleId: "io.tuist.App.watchkitapp.watchkitextension", infoPlist: "Support/WatchAppExtension-Info.plist", sources: ["WatchAppExtension/**"], resources: ["WatchAppExtension/**/*.xcassets"], dependencies: []) ])

Although there are some improvements pending to be implemented, the feature is ready for users to start using it in their projects.

Support for sticker extension & app

In the vein of adding support for more product types, this version of Tuist also includes support for sticker extensions and apps. You can find an example here of an app with a stickers extension and app.

Support for enabling test coverage in schemes

Before this version of Tuist, it was not possible to enable test coverage in schemes. Thanks to Abbas's work, it's now possible and there's an API for that. If you would like to enable it in your custom schemes, you just need to pass the codeCoverageTargets attribute when initializing a TestAction:

let test = TestAction.targets(["MyAppTests"], codeCoverageTargets: true)

You can check the documentation of the TestAction model here.

Defining the deployment target

Thanks to Daniel's contribution, developers will be able to specify the deployment target right in the definition of the target. Tuist will generate the right build settings for the targeted device and minimum runtime version. The snippet below includes an example of an app's target definition that uses the new deploymentTarget attribute:

let target = Target(name: "App", platform: .iOS, product: .app, bundleId: "io.tuist.App", deploymentTarget: .iOS(targetVersion: "13.1", devices: [.iphone, .ipad]), infoPlist: "Info.plist", sources: "Sources/**")

Other improvements

This version of Tuist also includes some minor improvements to some existing features:

What's coming

We are working on adding support for Project description helpers that will allow developers to extract reusable pieces of their manifests into a separate framework that their manifest files can import. Moreover, we'll make the API of ProjectDescription ABI stable to prevent future Swift versions from breaking Tuist local installations. We also started working on a web service for Tuist users, Galaxy, that will provide Tuist users with insights and caching.

Stay tuned because you have not yet seen everything Tuist has to offer you!

You might also like

Next for Tuist
It's a wrap for 2020. In this blog post we share the vision of Tuist for 2021. We'll bring support for plugins, improve and standardize the integration of third party dependencies, add support for selective building and testing, and much more.
Easily setup signing for your project with Tuist 1.11.0 Volare
The new Tuist release 1.11.0 Volare introduces a signing feature to help you with maintaining and integrating your signing artifacts.
Dynamically generated Info.plist files with Tuist 0.15.0
Tuist 0.15.0 extend the beauty of generation to Info.plist. From this version on you'll be able to define the build settings as part of your manfest and let Tuist infer the default values for you. Furthermore, we extended the API to support customizing the generation of default build settings in your projects and targets, added the generation time to the 'tuist generate' command, and added support for defining custom schemes.

Supercharge your app development

Get started