How to "hide" transient dependencies in swift

Viewed 27

I have just started the process og modularising an iOS swift app. Basically my approach is to add "feature" targets that builds as static libs that I then include in the app.

This makes a nice separation while keeping development fast since everything is still in the same xcode project.

My issue is that if let's say I separate out the networking layer to it's own static lib, and our networking layer uses Alamofire. Regardless that I only link the networking layer lib against Alamofire it will still be exposed to the main app (or other libs depending on the networking layer lib). Is there anyway that I can prevent Alamofire from getting exposed? I don't want the rest of the app to depend on it in case I need to swap it out at some point.

0 Answers
Related