-
Notifications
You must be signed in to change notification settings - Fork 404
Support different modes for depending on RevenueCat when using Tuist #5888
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
afe5625 to
76117b9
Compare
It's already resolved in Tuist/ProjectDescriptionHelpers/ProjectDescriptionPackages.swift
| .package( | ||
| url: "https://github.com/RevenueCat/purchases-ios", | ||
| branch: "main" |
There was a problem hiding this comment.
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
| .package( | ||
| url: "https://github.com/RevenueCat/purchases-ios-spm", | ||
| revision: "3.14.4" | ||
| ), |
There was a problem hiding this comment.
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
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
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 fromTests/v3LoadShedderIntegrationandTests/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
Environment Variables
TUIST_RC_LOCAL=falseTUIST_RC_REMOTE=trueand/orTUIST_RC_XCODE_PROJECT=trueUsage examples:
Local Swift Package (default)
Local Xcode Project (previous default)
Remote Swift Package (from GitHub main branch)
Remote Xcode Project
Notes
Still WIP. Needs more testing and complete all implementation (e.g. CEC)