Replies: 2 comments 6 replies
-
Hey @nmccann, this is a great idea, thanks for sharing! We plan on doing some tour-like episodes and we'll be sure to include little nuggets like this, and we plan on covering some of these things in dedicated episodes too. Also, you can always post questions in isowords discussions, that's why we enabled it on this repo 🙂. I can give a few more details about the SPM stuff. While the overhead you outlined is definitely a real thing, and we don't know of a way around it, it is still much, much, much better than the alternative of using Xcode targets. I used to grit my teeth when I wanted to create a shareable module from within Xcode because of all the ceremony and the multiple steps that you can get wrong. I would say the only reason we even attempted hyper-modularizing is because of how easy it is to do with SPM, and then doing so unlocked all types of great things for us. Further, having a simple text description of the dependency graph is much better than it being trapped in the Xcode project. Makes it easier to clean up unused dependencies and track down transitive dependencies. We even use SPM modules to easily separate out resources. For example, we have I do think SPM could help us out more, and we should probably file feedbacks and bugs. For one thing, test targets should probably be automatically added to the test phase of the corresponding main target. That would clear up some manual work. |
Beta Was this translation helpful? Give feedback.
-
One downside that I've found to the modular approach, is that you can no longer rely on Xcode to properly export localizable strings. It's "Export for Localizations" functionality only looks within the app targets, not within SPM packages, and there doesn't seem to be a way to configure it to do so (even with using I've worked around this by using
Would look through the App and Sources directories of This workaround is sufficient for a project that doesn't have a complex localization workflow, but might be a deal breaker for more complex apps. Though I'd argue that even the workflow with a "normal" Xcode app is more painful than it ought to be. |
Beta Was this translation helpful? Give feedback.
-
First of all I'd like to say thank you very much for open sourcing this project! I've been using the Composable Architecture for a while, and while the case studies provided with it are quite helpful, nothing beats seeing it how it works "in the wild" so to speak. I'm sure I'll be looking at this project for quite a while for tips on how to accomplish particular things in my own projects.
I was wondering if there are any plans to do something like a post mortem of the pro and cons of the decisions made on this project? The blog post announcing the open-sourcing did a good job of introducing some of the things that make this project special, but didn't talk too much about the challenges faced along the way.
In particular, I was quite excited to see how you're using SPM to manage all of your local and remote packages - I'm looking into replicating that on my project, but am concerned about some of the management overhead it adds. Specifically, when adding a new feature it now requires adding a target/test target to the Package.swift, adding the tests to the target's scheme (so CMD+U runs those tests), and optionally adding those tests to the main app target's scheme (so CMD+U on the app target runs tests for all features).
Perhaps there are some lessons learned that you could share in relation to the SPM integration, and any other issues you ran into along the way.
Thank you for your time, and for sharing this resource!
Beta Was this translation helpful? Give feedback.
All reactions