Use Swift Package Manager to Add Dependencies
SPM + Xcode + THAT GREAT PACKAGE
If you have reusable modules you might already use Swift Package Manager (SPM) to manage these dependencies for you. In this article, we will use SPM to fetch and use third-party code in our project.
excellent
Difficulty: **Beginner** | Easy | Normal | Challenging
This article has been developed using Xcode 11.4.1, and Swift 5.2.2
What are dependencies anyway?
Something you depend on. Now, come on, even I can do better than that.
Imagine you want to use an external library for something a little tricky, like networking.
We can call that library Alamofire, and indeed many programmers use this for their projects as it avoids using their own network library and can feel secure that the library is already in use and well-tested in a variety of contexts.
Now there is an in-built problem here. If the third-party dependency has a bug in it and they fix it; do you want to use that new version with the fix (probably) and do you want to use that new version with a host of new features (umm, probably — if it doesn’t break the code that I’m working on). Which means that dragging files into your project…