When you add a dependency to Xcode projects you have the options to add Swift packages, XCFrameworks, frameworks or libraries.
The official tool for managing the distribution of Swift code to automate the process of downloading, compiling, and linking dependencies.
CocoaPods will resolve dependencies between libraries, fetch the resulting source code, then link it together in an Xcode workspace to build your project.
Carthage builds your dependencies and provides you with binary frameworks, but you retain full control over your project structure and setup.
Without this tool, you’d do this by manually copying source code files, dropping in pre-compiled binaries or using a mechanism like Git submodules.