---
description: >-
  Are you on macOS and want to develop with Xcode? These instructions are for
  you!
---

# Creating a bot using an Xcode Project

## Prerequisites

* Latest version of Xcode (`14.1` as of writing)

## Creating a Swift CLI App Project

1.  Open Xcode. You'll be greeted with the following window if no project was open the last time Xcode was closed.&#x20;

    <figure><img src="https://1903821505-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWJuHiYLW9jKqPb7h8D7t%2Fuploads%2FIQk00Sc6I7unTrByVcoY%2FScreenshot%202022-12-14%20at%201.12.57%20PM.png?alt=media&#x26;token=6740a040-7363-4444-949f-224420b37f1c" alt=""><figcaption><p>Welcome to Xcode!</p></figcaption></figure>
2. Click on the **Create a new Xcode project** action
3.  In the window that appears, double-click on the **Command Line Tool** template under the **macOS** tab

    <figure><img src="https://1903821505-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWJuHiYLW9jKqPb7h8D7t%2Fuploads%2FutNzAdaV9wIUE4uMN5dA%2FScreenshot%202022-12-14%20at%201.15.33%20PM.png?alt=media&#x26;token=eff979c4-889b-498e-88bf-897a62892a89" alt=""><figcaption><p>Creating a new project - this never gets old</p></figcaption></figure>
4.  Choose a name for your project, and click **Next**\
    &#xNAN;_&#x49;'d recommend choosing a name following the UpperCamelCase convention_

    <figure><img src="https://1903821505-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWJuHiYLW9jKqPb7h8D7t%2Fuploads%2FCTSL6D1cZ0VvrXcZ3IvK%2FScreenshot%202022-12-14%20at%201.16.58%20PM.png?alt=media&#x26;token=c7c86d10-99ad-4131-b589-baf4c6e16a94" alt=""><figcaption></figcaption></figure>
5. Choose a place to store your project, preferably in a folder dedicated to Xcode projects, and check the **Create Git repository on my Mac** option if you'd like to place your project under source control
6. Finally, press the **Create** button, and your newly-created Xcode project should open in a few moments!&#x20;

## Follow Along

Want to see how your project should look after each page? I've created a GitHub repository containing an Xcode project that I made following these instructions. Below each page is a link to a specific branch in the repository, containing a snapshot of how my files looked after each step.

{% embed url="https://github.com/SwiftcordApp/DiscordKitGettingStarted" %}
Well, the project was literally empty after this step so a branch was kinda redundant
{% endembed %}
