Hive Hive
Sign in

[SPM] Fail to compile using SnapshotPreviews-iOS package

GitHub issue · Open

Metadata
Source
tuist/tuist #6162
Updated
Jun 11, 2026
Domains
Generated projects
Details

What happened?

Something about the setup with assets inside of https://github.com/EmergeTools/SnapshotPreviews-iOS makes Tuist break when using this dependency.

How do we reproduce it?

Create a project with this dependency:

Package.swift

let package = Package(
name: "Package",
platforms: [
.iOS(.v16)
],
products: [
...
],
dependencies: [
.package(
url: "https://github.com/EmergeTools/SnapshotPreviews-iOS.git",
from: "0.4.3")
],
targets: [
.target(
name: "Target",
dependencies: [
.product(
name: "SnapshotPreferences",
package: "SnapshotPreviews-iOS",
condition: .when(platforms: [.macOS, .iOS])),
]
)
]
)

Run tuist install && tuist generate

Error log

CpResource /.../SnapshotPreviewsCore/AccessibilitySnapshot_AccessibilitySnapshotCore.bundle (in target 'SnapshotPreviewsCore' from project 'SnapshotPreviews')
cd ~/dev/other/tuist-test-2/Tuist/.build/tuist-derived/SnapshotPreviews
builtin-copy -exclude .DS_Store -exclude CVS -exclude .svn -exclude .git -exclude .hg -resolve-src-symlinks ~/Library/Developer/Xcode/DerivedData/TuistTest2-flktmizkeotxqhclejqianiwswwq/Build/Products/Debug-iphonesimulator/SnapshotPreviewsCore/AccessibilitySnapshot_AccessibilitySnapshotCore.bundle ~/Library/Developer/Xcode/DerivedData/TuistTest2-flktmizkeotxqhclejqianiwswwq/Build/Products/Debug-iphonesimulator/SnapshotPreviewsCore/SnapshotPreviewsCore.framework
error: ~/Library/Developer/Xcode/DerivedData/TuistTest2-flktmizkeotxqhclejqianiwswwq/Build/Products/Debug-iphonesimulator/SnapshotPreviewsCore/AccessibilitySnapshot_AccessibilitySnapshotCore.bundle: No such file or directory (in target 'SnapshotPreviewsCore' from project 'SnapshotPreviews')

macOS version

14.4.1

Tuist version

4.9.0

Xcode version

15.2.0

Flights

Investigate, reproduce, or fix this item in an isolated repository. Each Flight preserves its outcome and agent session.

New Flights are paused Configure model inference, GitHub, and a sandbox provider to start another Flight. Existing results remain available below.
No Flights yet

Start a Flight and preserve its objective, outcome, and session here.

Comments
N
NachoSoto Apr 9, 2024

Looks like this is because of #5808.

F
fortmarek Apr 10, 2024

Looks like this is because of https://github.com/tuist/tuist/issues/5808.

Are you using enforceExplicitDependencies? As that option is only opt-in. Again, an actual reproducible sample would be helpful, I’m not able to reproduce based on your steps 🙏