Discord.swift
GitHub Repository
  • 👋Discord.swift
  • Overview
    • 💡Getting Started
    • 🛠️Creating a Project
    • ⬇️Installing the Package
    • 🤖Basic Bot
  • Resources
    • 📚Documentation
    • 🗂️Changelog
Powered by GitBook
On this page
  1. Overview

Installing the Package

Using Xcode to install the package.

PreviousCreating a ProjectNextBasic Bot

Last updated 1 year ago

With your project created, you need to add the package to your project. In Xcode navigate to File > Add Packages. Paste the Discord.swift URL () into the search box.

It's up to you on whichever Dependency Rule you'd like to use. But I would suggest using Exact Version while the project is still in beta. To see all released versions of the library, click . Finally, add the package.

If you're creating an executable project from , instead of Add Package you'll see Copy Dependency. From there, you'll need to add the library as a dependency in your package manager.

dependencies: [
    .package(url: "https://github.com/Defxult/Discord.swift.git", .exact("<version here>"))
]
// ...
dependencies: [
    .product(name: "Discord", package: "Discord.swift")
]
⬇️
https://github.com/Defxult/Discord.swift
here
Step 2a