| 1 | \page build-a-bot-xcode Building a Discord Bot using Xcode (OSX) |
| 2 | |
| 3 | \warning This tutorial expects you to have installed D++ via homebrew. If you haven't, please visit \ref install-brew. |
| 4 | |
| 5 | To create a bot with Xcode, follow the steps below to create a *working skeleton project you can build upon*. |
| 6 | |
| 7 | 1. Make sure you have Xcode downloaded, along with the developer command tools (for AppleClang). |
| 8 | 2. Clone the [template project](https://github.com/Jaskowicz1/mac-bot-template/). **Make sure you download the entire project and not just the .cpp file.** |
| 9 | 3. Open Xcode, hit "Open Existing Project" or "File"->"Open", navigate to the template folder and open the .xcodeproj file. You can also double click the file in Finder. |
| 10 | 4. Replace "add your token here" with your bot's token in the "main" file. |
| 11 | \image html xcode_token.png |
| 12 | 5. Click the run button to compile and run your bot! |
| 13 | \image html xcode_run.png |
| 14 | 6. Observe the output and watch your bot run! You may get warnings in this stage and that's okay! |
| 15 | \image html xcode_output.png |
| 16 | |
| 17 | ## Troubleshooting |
| 18 | |
| 19 | - Stuck? You can find us on the [official Discord server](https://discord.gg/dpp) - ask away! We don't bite! |