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

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 🙏