# Mac Installations

### Docker Desktop

Go to the [docker installation site](https://www.docker.com/products/docker-desktop/) and scroll down to the `Download Docker Desktop` button. Select the version of docker that relates to your CPU (Silicon or Intel).

Once the DMG is installed drag the Docker.app into your applications.

<figure><img src="https://3191976129-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuNe0Bz4zOAJoU0XMQXnd%2Fuploads%2FMszvpJenzRyPRAet4PSi%2Fimage.png?alt=media&#x26;token=045c4738-a5a8-419b-90cf-b4eb37e6bcf5" alt=""><figcaption></figcaption></figure>

### Node.js

Here are the following commands you need to run in terminal.

```bash
# Download and install nvm:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.2/install.sh | bash

# in lieu of restarting the shell
\. "$HOME/.nvm/nvm.sh"

# Download and install Node.js:
nvm install 22
```

If you **do not** have a \~/.zshrc file create one use `touch ~/.zshrc`&#x20;

Open this file `open ~/.zshrc`  and add the following line to the bottom of your **\~/.zshrc** file and hit save <kbd>command</kbd> + <kbd>s</kbd>

```bash
# Path to your node
export PATH="$HOME/.npm-global/bin:$PATH"
```

Finally, run `source ~/.zshrc`&#x20;

### NestJS

To download NestJS run the following command in terminal. `npm i -g @nestjs/cli` the <kbd>-g</kbd> means that you are going to download this globally on your device

### Xcode, IOS simulator (Optional YOU DO NOT NEED THIS)&#x20;

In the app store, search for **Xcode** and hit install. During instillation, it will give you the option to also download IOS phone simulator. Agree to download this too.&#x20;

#### Opening a simulator

Open the simulator application on your mac. (<kbd>command</kbd> + <kbd>space</kbd>, then search simulator)

In the navigation bar, follow File/New Simulator.&#x20;

<figure><img src="https://3191976129-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuNe0Bz4zOAJoU0XMQXnd%2Fuploads%2Ft5esTHMZzmbuJzI5LaX3%2Fimage.png?alt=media&#x26;token=4cd45f00-3d82-455a-bb59-780ed18736bf" alt=""><figcaption><p>Press Create once filled in</p></figcaption></figure>

### Android Studio

Go to the [Android Studio](https://developer.android.com/studio?gad_source=1\&gclid=Cj0KCQjw16O_BhDNARIsAC3i2GCQbzlOhFj5sYgktp6D5TXnNWp1IqkoCEZwVIY75x1jU3wf1Vp_RYkaAh7MEALw_wcB\&gclsrc=aw.ds) website on your browser. Press the button **Download Android Studio Meerkat** and agree to the terms and conditions. Be sure to download the correct version for your mac chip.&#x20;

<figure><img src="https://3191976129-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuNe0Bz4zOAJoU0XMQXnd%2Fuploads%2F37widfSBOGKCsdtS1gBx%2Fimage.png?alt=media&#x26;token=301e249f-3afe-4845-8621-60eaffd9eeb8" alt=""><figcaption><p>Drag and drop android studio.app into your applications</p></figcaption></figure>

Open Android Studio app, press **open** despite the warning it is being downloaded from online.&#x20;

In the Projects tab press the three vertical dots on the  right of the search project and then click on **Virtual Device Manager**

<figure><img src="https://3191976129-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuNe0Bz4zOAJoU0XMQXnd%2Fuploads%2FDb9vCsI8MGIuWBAXOSdw%2Fimage.png?alt=media&#x26;token=5b32f710-8d45-49aa-a9ed-9d076d126a38" alt=""><figcaption></figcaption></figure>

In this screen press the + sign and select the phone you want to emulate. Hit Next and then rename the emulator to something you will remember and press **finish**. &#x20;

<figure><img src="https://3191976129-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuNe0Bz4zOAJoU0XMQXnd%2Fuploads%2FJtCBLO2TRFCixcwRhbKT%2Fimage.png?alt=media&#x26;token=3d30d216-e8e2-46d4-a59c-eb7ea497a44c" alt=""><figcaption></figcaption></figure>

### Homebrew

Run this is a new terminal

```
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
```

### Flutter

Lets download Flutter. This step is slightly more involved so be sure not to miss any steps.

If you are running on **Apple silicon** you need to instal rosetta. In your terminal run the following code.

```
sudo softwareupdate --install-rosetta --agree-to-license
```

We are going to use VS Code to [install flutter](https://docs.flutter.dev/get-started/install/macos/mobile-ios)

1. Launch VS Code. Make sure your VS Code version is ≥ 1.86
2. In the Extensions section, type `flutter`  and install the extension.
3. To open the **Command Palette**, press <kbd>Command</kbd> + <kbd>Shift</kbd> + <kbd>P</kbd>.
4. In the **Command Palette**, type `flutter`.
5. Select **Flutter: New Project**.
6. VS Code prompts you to locate the Flutter SDK on your computer.
7. Click **Download SDK**.
   1. Download flutter into **\~/development/** directory

Once the Flutter install is complete your output display panel will show:

```
Building flutter tool...
Running pub upgrade...
Resolving dependencies...
Got dependencies.
Downloading Material fonts...
Downloading Gradle Wrapper...
Downloading package sky_engine...
Downloading flutter_patched_sdk tools...
Downloading flutter_patched_sdk_product tools...
Downloading windows-x64 tools...
Downloading windows-x64/font-subset tools...
```

After this you should get an option to download the flutter SDK path, click **view instructions** and follow the steps. It will take you to this [link](https://docs.flutter.dev/get-started/install/macos/mobile-ios#add-flutter-to-your-path), when downloading the flutter SDK it it says it does not know where to find the SDK set the flutter folder inside of development as your flutter SDK.&#x20;

To do this:

`open ~/.zshrc` add the following line at the bottom of your file and replace () with the pathname to your **flutter/bin** directory.

<kbd>export PATH="$PATH:()"</kbd>&#x20;

<kbd>command</kbd> + <kbd>s</kbd> and then run the line `source ~/.zshrc`

save this file&#x20;

1. VS Code may display a Google Analytics notice.

   If you agree, click **OK**.
2. To enable `flutter` in all Terminal windows:
   1. Close, then reopen all Terminal windows.
   2. Restart VS Code.

#### Flutter doctor

When you run `flutter doctor` in terminal, flutter will give you a summary of all of the dependencies that have been set up correctly. It may look something like this:&#x20;

```
Running flutter doctor...
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.29.1, on macOS 14.4.0 23E214 darwin-arm64, locale en)
[!] Android toolchain - develop for Android devices
[!] Chrome - develop for the web
[✓] Xcode - develop for iOS and macOS (Xcode 16)
[!] Android Studio (not installed)
[✓] VS Code (version 1.96)
[✓] Connected device (1 available)
[✓] Network resources


! Doctor found issues in 3 categories.
```

At this point if you have a \[!] in front of Android Studio, come to Jack for assistance.&#x20;

#### Flutter for Xcode (optional)

First we need to install ruby:

```
# Installing Ruby 
brew install rbenv ruby-build

# Adding path in .zshrc
echo 'eval "$(rbenv init - bash)"' >> ~/.zshrc
source ~/.zshrc

# installing up to date ruby version
rbenv install 3.2.2
```

Run the `open ~/.zshrc` and then past the following lines of code at the bottom of your **.zshrc** file.

```
# rbenv setup
export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"
```

Run the next lines of codes to complete installation.

```
# finalise up to date ruby for cocoapods
source ~/.zshrc
rbenv global 3.2.2
rbenv rehash

# install cocoapods
sudo gem install cocoapods
```

&#x20;Now when running flutter doctor you will see that VS CODE has an up to date version.&#x20;

You are ready to start up your project.&#x20;

<br>
