Skip to content

XcodeProj: Unable to build main target with local SPM dependency with Image assets #7381

@hf-anton-kolchunov

Description

@hf-anton-kolchunov

What happened?

Xcode 15 has introduced autogenerated types for Image and Color assets to provide compile check of the referenced assets.

The dependency target build fails due to missing autogenerated types/extensions for ImageResource, if it is defined as .external with .staticFramework product type and contains .xcassets in Resources.

It's possible to overcome build issue by manually adding Images.xcassets catalog to the target's "Copy Bundle Resource" build phase.

How do we reproduce it?

  1. Use attached sample project failing_build_with_dependency_with-resources.zip
  2. Generate Xcode Workspace mise x -- tuist install && mise x -- tuist generate
  3. Try to compile app

Error log

DependencyWithImages/Sources/DependencyWithImages/DependencyWithImages.swift:8:20: error: type 'String' has no member 'tuistLogo'
            Image(.tuistLogo)

Image

macOS version

14.7.4

Tuist version

4.43.2

Xcode version

16.2

Metadata

Metadata

Assignees

Labels

domain:generated-projectsIssues related to the project-generation featurestype:bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions