Skip to content

Conversation

@ajpallares
Copy link
Member

@ajpallares ajpallares commented Dec 10, 2025

Motivation

Sometimes we get compilation errors in the tests targets like these:
image

The reason is that the RCPurchasesErrorCodeDomain symbol is not explicitly declared in the SDK. It's the Objective-C bridge of ErrorCode.errorDomain and is declared in the auto-generated RevenueCat-Swift.h file:

static NSString * _Nonnull const RCPurchasesErrorCodeDomain = @"RevenueCat.ErrorCode";

But this RevenueCat-Swift.h file doesn't always necessarily exist.

In particular, I got this error when adding the RevenueCat dependency to Unit Tests as a Swift Package using Tuist when working on #5888.

Description

This PR replaces the uses of RCPurchasesErrorCodeDomain in tests with its Swift equivalent: ErrorCode.errorDomain, which is always defined.

@ajpallares
Copy link
Member Author

@RCGitBot please test

@ajpallares ajpallares marked this pull request as ready for review December 10, 2025 15:01
@ajpallares ajpallares requested a review from a team as a code owner December 10, 2025 15:01
Copy link
Contributor

@rickvdl rickvdl left a comment

Choose a reason for hiding this comment

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

Good catch!

@ajpallares ajpallares merged commit 9068cbe into main Dec 12, 2025
48 checks passed
@ajpallares ajpallares deleted the use-error-code-domain branch December 12, 2025 13:24
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