Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Xcode wiki page #11

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/.vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ export default defineConfig({
text: "Development Environments",
items: [
{ text: "Visual Studio Community", link: "/resources/dev-envs/visual-studio-community" },
{ text: "Xcode", link: "/resources/dev-envs/xcode" },
{ text: "CLion", link: "/resources/dev-envs/clion" },
],
collapsed: true,
Expand Down
Binary file added src/public/assets/xcode-create-project.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/public/assets/xcode-home.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/public/assets/xcode-project-dir.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/public/assets/xcode-setting-up.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
47 changes: 47 additions & 0 deletions src/resources/dev-envs/xcode.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Setting Up Xcode

Xcode is Apple's official IDE for macOS. It provides toolchains for C & C++ development on macOS. Xcode can be
downloaded for free from the Mac App Store by simply clicking the "Get" or "Download" button to begin installation.

::: info
Beta and older releases can be found [here](https://xcodereleases.com/).
:::

After installation is done, launch Xcode. When opening Xcode for the first time, you may be prompted to
install additional components or agree to license terms. Follow the on-screen instructions to complete this process.

When Xcode opens, you'll see the Xcode menu. Click on "Create New Project...".

![Xcode - Home](/assets/xcode-home.png)

In the project template selection window, choose "Command Line Tool" under the "macOS" tab and click "Next".

![Xcode - Create Project](/assets/xcode-create-project.png)

The IDE will now be asking you to configure your project. First of all, enter a name for your project then enter
a reverse domain name format (e.g. com.tccpp), and then choose a location to save your project to and click "Create".
You should see the Xcode development interface once the project is successfully created.

![Xcode - Setting up](/assets/xcode-setting-up.png)

::: info
Xcode keeps your code organized through projects and workspaces. Each project contains everything needed to build
software i.e. source code, images, binaries, config files like `info.plist` and other assets, whereas a workspace
is a container that can hold multiple projects. Workspaces come in quite handy as they let you manage multiple
related projects in one place for a large codebase.
:::

## Writing Your First Program

![Xcode - Project Directory](/assets/xcode-project-dir.png)

Xcode has already created a `main.c` or `main.cpp` file for you depending on your language selection with a
basic "Hello, World!" program which can be found on the leftside bar.

Click on the main file to open it in the Editor Area where to modify
[your first program](/resources/getting-started#your-first-program).

## Running Your Program

To run your program, click the "Play" button (green triangle) in the top-left corner of the Xcode window,
or press `⌘ + R` which will then build and run your code.
6 changes: 3 additions & 3 deletions src/resources/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ To get started on Windows, select one of the following guides to set up a develo

## Getting Started on Mac

- Visual Studio Code (TODO)
- XCode (TODO)
- CLion (TODO)
* Visual Studio Code (TODO)
* [XCode](/resources/dev-envs/xcode)
* CLion (TODO)

## Your First Program

Expand Down
Loading