iOS Modularization

Hi guys, I m quite new with Swift.

Hope could learn a lot with this community.
Recently I just joined a small company and they ask me to refactor their monolith project into Modular thus make me googling it but I found there are actually many variations of Modularization.

My question is what kind of Modularization is good for scaling with multiple teams that focuses on different products ?

  • Modularization with framework in side main project ?
    or
  • Modularization with framework outside main project (separate .xcodeproj)

can you guys tell me which one and why ?

Thanks Appreciate the help :smile:

1 Like

Neither, I would simply work with Swift Packages.

Since Swift Package Manager support was added to Xcode, I have not come across a need for using a Framework target within an Xcode project.

Hi bdrelling thanks for the answer. I would like to use SPM unfortunately we already used cocoapods and it’s too much resources if we have to change it to SPM

There’s no reason that you can’t use both alongside one another for external dependencies, and that’s especially true for internal dependencies.

You can keep your external dependencies in CocoaPods and still create Swift Package directly in your Xcode Workspace for internal modules.

1 Like

But would it increase memory size? As we you multiple dependency framework here.

And can I link the lib that installed in cocoapods to be used in SPM?