Now that we know a little more about SPM and what it brings to developing with Xcode, it's time to rewind our story and go back to our initial aim of using SPM to break our apps down into separate, reusable modules. When you extract some code from an existing project to create a framework out of it, it is usually the case you will need to refactor the code to improve its modularity. This is the focus of the next section, while the following one will focus on creating the framework.
You may find it a bit confusing, but we should take care of differentiating between modules and modularity when using Swift. On the one hand, indeed, modules and frameworks are almost the same in Swift parlance. In Swift, in fact, modules are the representation of frameworks at the language level. Or, if you prefer, frameworks are binary entities that Swift represents...