Now that we have learned the basics of using SPM to create a simple library, let's have a look at how to work with external dependencies. So, let's add one to our package. For this example, we will work with Google Promises, which we covered in Chapter 12, Futures, Promises, and Reactive Programming. So, open Package.swift in your preferred editor and make sure the dependencies section looks like this (the text you should add is in bold):
dependencies: [
// Dependencies declare other packages that this package depends on.
// .package(url: /* package url */, from: "1.0.0"),
.package(url: "https://github.com/google/promises.git", .exact("1.2.3")),
],
When it comes to editors, every programmer has their inalienable preferences. Swift is supported by most text editors, including Sublime...