Now that the module has been created, let's look at how we would use it in a project. The first thing we will need to do is to create a new project. The following commands will set up a new project named
mkdir pcapProject cd pcapProject swift package init
Now that the directory structure for our project has been created, we need to tell the compiler to use the newly created
Cpcap module. To do this, we will need to add a dependency to the
Package.swift file. The following code will define our application and also its dependency on the
import PackageDescription let package = Package( name: "pcapProject", dependencies: [.Package(url: "../Cpcap", majorVersion: 0, minor: 1)] )
We add the dependency ...