Skip to content

Conversation

@ajpallares
Copy link
Member

@ajpallares ajpallares commented Nov 27, 2025

Motivation

Most developers integrate RevenueCat via SPM. Defaulting Tuist projects to SPM integration ensures our examples and tooling better reflect real-world usage, helping us catch SPM-specific issues earlier during development.

Description

Changes the default way Tuist-generated projects depend on RevenueCat and RevenueCatUI from Tuist's XcodeProj-based integration to local Swift Package Manager (SPM) integration.

Changes

New RevenueCatTests tuist project

This project now contains all the test targets. Separating these from the RevenueCat and RevenueCatUI tuist projects allows us to have the RevenueCat and RevenueCatUI dependencies be configured by the new environment variables (see below).

For example, now doing

tuist generate UnitTests

creates the RevenueCatTests Xcode project that contains the UnitTests target, which depends on the RevenueCat Swift Package.

Removes Project `v3LoadShedderIntegration` from tuist

There's also v4LoadShedderIntegration, which wasn't added to tuist yet. There's no need of tuist for these 2 projects and they each depend on a specific, fixed, version of purchases-ios-spm (latest v3 and latest v4). These projects can be opened directly with Xcode from Tests/v3LoadShedderIntegration and Tests/v4LoadShedderIntegration.

Adds support for both CI.xcconfig and Local.xcconfig

Previously, they were mutually exclusive (only 1 would be added to the Tuist workspace). The import order in Global.xcconfig determines the priority

#include? "CI.xcconfig"
#include? "Local.xcconfig"

Environment Variables

Before After
TUIST_RC_LOCAL=false TUIST_RC_REMOTE=true and/or TUIST_RC_XCODE_PROJECT=true

Usage examples:

Local Swift Package (default)

tuist generate

Local Xcode Project (previous default)

TUIST_RC_XCODE_PROJECT=true tuist generate

Remote Swift Package (from GitHub main branch)

TUIST_RC_REMOTE=true tuist generate

Remote Xcode Project

TUIST_RC_REMOTE=true TUIST_RC_XCODE_PROJECT=true tuist generate

Notes

Still WIP. Needs more testing and complete all implementation (e.g. CEC)

@ajpallares ajpallares changed the title Support different modes for depending on RevenueCat when using tuist Support different modes for depending on RevenueCat when using Tuist Nov 27, 2025
@ajpallares ajpallares force-pushed the default-tuist-to-local-swift-package branch from afe5625 to 76117b9 Compare December 10, 2025 11:46
It's already resolved in Tuist/ProjectDescriptionHelpers/ProjectDescriptionPackages.swift
Comment on lines -32 to -34
.package(
url: "https://github.com/RevenueCat/purchases-ios",
branch: "main"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tuist/ProjectDescriptionHelpers/ProjectDescriptionPackages.swift already handles local vs remote packages based on dependencyMode, so this dependency is redundant

Comment on lines -36 to -39
.package(
url: "https://github.com/RevenueCat/purchases-ios-spm",
revision: "3.14.4"
),
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was only needed for v3LoadShedderIntegration, which has been removed from tuist

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants