Released alongside Swift 3, Swift Package Manager (SPM) is Swift's native response to attempt to solve the dependency-management problem. SPM is native in the sense that it is written in Swift, and you will use Swift to interact with it. If you are not familiar with dependency management, it can be defined as tools and techniques that enable to share and integrateexternal (or internal) librariesin a structured manner.
In this chapter, we will cover the following topics:
- Creating a library package as well a command-line tool that consumes the library
- Adding third-party dependencies and integrating your packages in iOS and macOS Xcode projects
- Refactoring an existing app to extract a reusable framework out of it and sharing it using a git repository