title: Share common code between 2 iOS apps: Swift Package Manager? Cocoapods? Monorepo?
body: <p>I am about to start working on two new iOS apps, that will share a bunch of business logic, like the whole API layer plus the models. Instead of copying the shared code in both projects and trying to keep that in sync, I want to use some way to share the code.</p>
  
  <p>My first though was that I'd use the Swift Package Manager. It's really easy to create a new package in Xcode, but I don't really know how to use the local version of the shared package in both apps while I am working on it, while also making it work for other devs (or CI!) checking out the apps. Can't really commit the apps having a local path dependency, because that would only work for me, right?</p>
  
  <p>So, can I use a local version of that core package while working on the 2 apps and that core package, but still have it all pushed to GitHub and that it compiles on CI and for other devs too? Or would it only work on my machine since it would reference a local path?</p>
  
  <p>Would using Cocoapods with a private pod make things easier or would I run into the exact same problem of working on a local path dependency on my computer, but wanting to have it work for other devs too?</p>
  
  <p>Or should I just go with a monorepo containing both apps and the shared code, and just have everything use relative paths? Would a SPM package inside of the monorepo be helpful in this situation, or just use relative paths in both apps?</p>