Skip to content

Fix compilation search paths error for 'Testing' in consumer app targets#118

Merged
Maks-Jago merged 1 commit into
1.5.1from
fix/remove-unused-testing-import
Jun 3, 2026
Merged

Fix compilation search paths error for 'Testing' in consumer app targets#118
Maks-Jago merged 1 commit into
1.5.1from
fix/remove-unused-testing-import

Conversation

@killlilwinters
Copy link
Copy Markdown
Collaborator

@killlilwinters killlilwinters commented Jun 3, 2026

Description

This PR resolves a compilation failure encountered when importing SwiftUI-UDF in non-test consumer targets (like standard iOS applications).

Problem

In recent versions, the import Testing statement was added to UDF/Store/TestStore/TestStore.swift. Because TestStore.swift is packaged inside the main UDF target (a regular library product) instead of a test target or test-support module, Xcode builds this file whenever the library is compiled.

When a consumer app target compiles, the compiler encounters the import Testing line but fails because standard app targets do not include Apple's Swift Testing framework (Testing.framework) in their developer search paths. This results in the following compilation error:

error: Compilation search paths unable to resolve module dependency: 'Testing'

Solution

The import Testing statement in TestStore.swift is entirely unused by the class implementation. This PR removes the unused import, allowing the module to compile successfully for all consumer configurations without requiring special framework search paths in non-test targets.

Verification

  • Checked out the modified library dependency inside a consumer project.
  • Ran xcodebuild for the consumer's app target.
  • Verified that the 'Testing' dependency resolution error is gone and the target compiles successfully.

@killlilwinters killlilwinters requested a review from Maks-Jago June 3, 2026 10:36
@killlilwinters killlilwinters force-pushed the fix/remove-unused-testing-import branch from 440edac to edde389 Compare June 3, 2026 10:38
@Maks-Jago Maks-Jago merged commit 99b1482 into 1.5.1 Jun 3, 2026
1 check passed
@Maks-Jago Maks-Jago deleted the fix/remove-unused-testing-import branch June 3, 2026 10:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants