Hello everyone,
We recently started using tuist cache in our iOS project, and it’s been an amazing tool so far! However, I’ve encountered an issue when caching: static frameworks linked to a dynamic framework are being attached to the main app target. This doesn’t happen when we build without the cache.
In our setup, we have a shared dynamic framework for analytics that integrates static frameworks like Firebase and other trackers. For some reason, when using the cache, all the xcframeworks end up linked to the main app target. This causes a crash on app launch due to duplicate symbols, specifically [FIRApp configure…].
All third-party frameworks are integrated via Tuist’s SPM, and their productType is explicitly set to .staticFramework.
I’d greatly appreciate any insights or information that could help resolve this issue.
Hi @PSKuznetsov 
And welcome to the forum. The mix of static and dynamic product types is always tricky, but let’s figure out what the issue is and make it work.
Would you be able to isolate the issue in a reproducible project that you can share with us? I’d focus on the part of the graph that is causing the issue. Once you have it reproduced, we can more easily spot what the issue or bug might be.
Thank you for your fast response, @pepicrft !
As a temporary workaround, I’ve managed to fix this by making the aggregate target a static framework as well. This post was helpful. I plan to reproduce the issue in a separate project soon. I suspect the root cause might be related to our aggregate framework being a mixed ObjC/Swift framework. While we’ve restricted all Swift imports to internal, there could be something happening on the ObjC side. I’ve inspected the generated modulemap inside the framework and noticed export * and module * { export * }, which seems suspicious to me.
I’m glad to hear you found a temporary workaround.
I’m looping @marekfort in, since he “battled” Firebase packages a few times in the past, and had to put some items in place to make them work.
Let us know once you have the reproducible project. That’ll be quite handy!
Happy caching 
1 Like
I’m not sure what could be the cause here based on the provided context. Boiling this down to a repro sample would help a ton.