we are currently evaluating Tuist for our app project and are close to the finish line, but after the rollback mentioned here, we are now blocked by static dependencies that rely on synthesized resource accessors, and despite searching the internet and this forum I could not find any existing workaround.
Expectation
I know that one workaround would be switching the affected frameworks to dynamic linking, but our setup is quite complex, with over 100 Tuist modules and many interdependent remote dependencies, so selectively using dynamic frameworks is not really feasible and everything is currently linked statically.
Because of this, I have been looking for another way to get remote dependencies that use resource accessors to compile successfully when linked statically, but so far I have not found any solution.
Context
Tuist version: 4.152.0
Reproduction (mandatory for problems)
I did not include a reproducible project, since this appears to be a known limitation, but I am happy to provide a sample project if that would help.
“Turns out that when you extract the resources of a target into an associated bundle, like we used to do, Xcode doesn’t synthesize the resource accessors because it doesn’t know the bundle resources are associated with the target.”
Since you are back to extracting resources of the targets into bundles, I imagined that this is the “expected” outcome. If that is not the case, I am happy to try and reproduce our issue in an example project.
As to our motivation for the Tuist adoption: As I mentioned, we have a very dependency heavy app and we’ve heavily been working on modularising it the past year. That really exposed the deficits of SPM as a project management tool. Uncontrollable Package resolving followed by invalided caches and long (CI) builds pushed us to look for a solution.
Thanks a lot for the information. I think I understand the issue now.
Just remembered that what SwiftPM does is add the resources, which are included in the bundle, as sources of the target associated with the bundle. Since they are not valid sources, they don’t get compiled, and trigger Xcode’s built-in mechanism for synthesizing the symbols.
Let me try that approach, and I’ll open a PR shortly.
This story keeps repeating . I remember not too long ago, I talked about this publicly, and many people jumped to say that SwiftPM just works fine at scale. You’ll be happy then to see all your dependencies becoming a static graph that Xcode processes instantly.