Installation
Swift
Download and install Swift 5.3 or higher.
Swift Package Manager
New Package
This creates a new executable package named MyPackage.
mkdir MyPackage
cd MyPackage
swift package init --type executable
Package Manifest
Add the Console package as a dependency by specifying its name, url, and version.
dependencies: [
    .package(name: "chaqmoq-console", url: "https://github.com/chaqmoq/console.git", from: "1.0.0")
]
Add the Console target to your desired target as a dependency by specifying its name and package where you want to import and use it. In this case, we are adding it to the default target named MyPackage generated using the swift package init command we executed earlier.
targets: [
    .target(name: "MyPackage", dependencies: [
        .product(name: "Console", package: "chaqmoq-console")
    ])
]
Build
This builds the MyPackage and installs the Console package with the Debug configuration needed for development.
swift build
Once you are ready to deploy, you can run the command below that builds the MyPackage and installs the Console package with the Release configuration optimized for production.
swift build -c release
Xcode Project
- Open your Xcodeproject.
- Go to File->Swift Packages->Add Package Dependency.
- Enter the Consolepackage URL:https://github.com/chaqmoq/console.git.
- Choose the version you want to install. We suggest installing the latest stable version by using the Up to Next Major strategy.
- Add the Consolepackage to your desired target of theMyPackagewhere you want to import and use it.