Default setting for Generated Swift Asset Symbol Extensions

Question or problem

I noticed that when generating new .app projects with Tuist, the resulting xcodeproj does not have the ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS flag enabled.

Manually enabling the flag does work as expected but the mis-match between default Xcode behavior and tuist generate behavior was unexpected.

Related issue: Tuist doesn't generate resource accessors for local swift package targets · Issue #4448 · tuist/tuist · GitHub

Expectation

Expectation would be that baseline Tuist project settings would match baseline new Xcode project settings.

Context

  • Tuist version: 4.43.2

Extra Info

It is worth noting on a new project it seems the macOS Default is no, but the project is set to Yes. Not sure if Tuist’s source-of-truth for defaults during project generation but figured I’d mention.

Reproduction (mandatory for problems)

Run tuist generate on the sample app here: GitHub - jonnyklemmer/TuistDemo: Project to highlight and test building iOS apps with Tuist

Workaround of manually enabling the configuration flag (see commented out code in Project.swift) does resolve the issue.

Hey @jonnyklemmer :wave:

The reason why that setting is not enabled by default is that Tuist ships with custom resource synthesizers built on top of SwiftGen. I do think we should move to the Xcode-generated accessors (or “symbol extensions”), but we’ll need to ensure we can do that in a backwards-compatible manner.

One idea would be to generate typealiases that would bridge the current way of generating accessors to the Xcode way.