COMP3130 Week 1 Workshop
COMP3130 Week 1 Workshop
COMP3130 Week 1 Workshop
If you follow the instructions, by the end of it you will have these installed on your system
1. A package manager (Chocolatey for Windows, Homebrew for MacOS) using which you
will install many other packages and tools that are required
2. Node server (Node.js as it is usually referred to) for executing the applications
3. JDK since applications would require this to run
4. Watchman on MacOS for better performance
5. Android development environment (Installation of Android Studio (standard
installation), Installation of Android SDK (10) and configuring the environment
variables)
6. iOS development environment (only for Mac OS users- please install XCode and
CocoaPods which is a library manager for XCode Projects. Please note that XCode
requires your Mac OS to be of v10.15.4 or later)
7. Please do not install react-native cli as this has to be done for each of the projects locally.
For Expo, please check the version of node that you are running using your terminal and the
node -v command
You have to have a version of at least 12. To upgrade, you need to use the command
npm update and that should update your node to the latest version.
Step 3: Install Expo Client on your phone. This would help to run the app on your phone.
Step 4: Install a Code Editor of your choice such as Atom or VS Code. Click here to download VS
Code. VS Code is more powerful and this is something that we will be using in this unit.
Once you install VS Code, add extensions in there
On the left panel, click on the extensions tab and search for the following extensions and install
them
1. React Native Tools from Microsoft
2. React-Native/React/Redux snippets for es6/es7 from EQuimper
3. Material Icon Theme from Philipp Kief
4. Prettier from Prettier
There are some visuals on the next page to help you understand the extensions tab
After Installation of those,
1. Click on Code-> Preferences-> Settings, Search for FormatOnSave and ensure the
checkbox is selected
2. Click on View-> Command Palette-> Type Shell Command->Select Install 'code'
command in PATH and once that is selected, you will have your keyboard shortcut to
access the codes of a project through Terminal
You’ve your environment ready now and you will be creating your expo application next.
Once you are in the folder, type expo init MyFirstProject
This will prompt you to choose a template. We will be using the Managed workflow (blank
option) which helps to create your expo project. The instructions on how to run the project will
also appear.
Let’s do this a bit different through VS Code Editor. To run your project,
1. Cd into the project directory
2. Type code . to open the codes of your project through VS Code.
3. The project folder will now open in VS Code and you will see all the subfolders and files
5. On your terminal type the command npm start and this will open a browser where you
can see the instructions to view the app
Option 2: Running the app on a web browser:
Click on Run on a web browser option to view the executed app on your browser (which opens
in a new tab)
Option 3: Running the app on an Android Emulator:
Open Android Studio. Click on Configure->SDK Manager
If you are a MacOS user, please ensure you follow the following steps
You might have to double check your Bash Profile file for the path of Android SDK and Android
platform tools. To do this, open a new terminal window and type the command code
~/.bash_profile
This will open the bash_profile file in VS Code
In your Android Studio, again open your SDK Manager (Configure-> SDK Manager) and copy the
path from SDK Manager
More info here, if you are interested
The next step is to configure our Emulator. Click on Configure-> AVD Manager
This is your Android Virtual Device Manager that allows you to create your Emulator
Click on Create a Virtual Device and add an Emulator that has a play store installed. I have
added a Pixel 4 with Android Q as my OS on the Emulator. Click on Download and this should
take a while to install
Once you click okay, it will create an emulator for you to use. Please ensure this is open
before you run the app. You can access the emulator by opening Android Studio-
>Configure-> AVD Manager and Launching the Device
When you click the Play button, it launches the Emulator. To run the app, you can either
run command a on the terminal in VS Code or you can run it from the browser by
clicking on Android Emulator. When you do this, you can see the log on the VS Code. It
downloads Expo and then runs the app
3. Click on Locations-> Command line tools and select XCode from the dropdown menu
5. Once the Simulator is open, you can change to a simulator of your choice by click on
File-> Open Simulator-> iOS and choosing a simulator of your choice. Please ensure
you have only one Simulator open at the time of execution of the app
6. To run the app, go to the terminal section on VS Code, type the command i to open
the app in the simulator. If you want to see the list of options, you can use ? to make
terminal list all the options
You will see a pop up to open the app on expo, click on Open and that will open the app on Expo.
A pop-up that confirms the link that you can share. More on this subject in later weeks
Setting up the Figma Account
1. Click on https://figma.com/education
2. Click on Get Verified and register your account using your student email
3. You will be using this to create your wireframes and mockups