This README
is designed to help you get your Draftbit app running locally. Read
through the next few sections carefully, and if you encounter any issues please
do not hesitate to post in Community.
Note that all of the commands in this document should be run using your computer's command line. If you're unsure of what this is, please read this guide before moving on.
Remember, at any point you can go back to build.draftbit.com and continue building your app there!
- Node.js LTS release. As of 07/21 this is 14.17+
- Expo CLI
- Git
- Watchman for macOS users
- Yarn use this over
npm install
when installing dependencies
Only Node.js LTS releases (even-numbered) are recommended. As Node.js officially states, "Production applications should only use Active LTS or Maintenance LTS releases."
- VSCode Editor
- VSCode Expo Extension for
app.json
debugging and autocomplete.
- VSCode Expo Extension for
- Windows users: PowerShell, Bash via WSL, or the VSCode terminal.
- Expo Go for iOS and Android
- ๐ค Android Play Store - Android Lollipop (5) and greater.
- ๐ iOS App Store - iOS 11 and greater.
You can install Node by going to the website directly and clicking the side that says "Recommended For Most Users". This will guide you through the process.
Once Node has been installed, run the following on the command line to make sure it's been installed correctly:
$ node -v
If you see the current version of Node in response, you've successfully installed Node on your machine.
For example,
$ node -v
v14.17.3
Learn more about installing Nodejs
๐ณ Need help? Try searching the Community โ which are a great resource for troubleshooting.
You can install the Expo CLI using the following command. This is the one spot where npm install is required!
$ npm install -g expo-cli
Verify that the installation was successful by running expo whoami
. You're not logged in yet, so you will see "Not logged in". You can create an account by running expo register
if you like, or if you have one already run expo login
, but you also don't need an account to get started.
Learn more about Expo CLI here
First, navigate to the project directory. The .zip will likely be in your downloads folder, so extract the .zip and move it to the desired location before proceeding.
Now, run the following commands to install the project dependencies (note that you'll need an internet connection to do so).
$ cd Desktop/New-App
$ yarn
The
cd
command above takes you into the project directory so you can install the correct dependencies. You should replaceDesktop/New-App
with the actual path to your unzipped project folder.
To start your project, simply run: yarn start
inside of the project directory
(make sure you've installed the dependencies
locally first). This should open the Expo
developer tools in a browser tab.
You can run your app on your mobile device, on the iOS simulator (if you have a Mac), or on the Android emulator. If you'd prefer to run your app on an emulator, see the installation instructions below.
The fastest way to get up and running is to use the Expo Go app on your iOS or Android device. Expo Go allows you to open up apps that are being served through Expo CLI.
- ๐ค Android Play Store - Android Lollipop (5) and greater.
- ๐ iOS App Store - iOS 11 and greater.
.
โโโ assets # Static assets like images and fonts.
โโโ config # JS representation of fonts, images, themes, and more
โโโ Themes.js # Example file for your app's themes
โโโ screens # React Native code for the screens you built.
โย ย โโโ MyFirstScreen.js # Example file for the screen named "My First Screen"
โโโ components.js # All your custom components
โโโ .gitignore # List of files to ignore when comitting with Git
โโโ App.js # Entry point for your app
โโโ app.json # Configuration file for your app, used by Expo
โโโ AppNavigator.js # Code for your app's navigators
โโโ package.json # The metadata for your project, including dependencies
โโโ README.md # This file!
Expo has really great documentation for how to get started. Click here to learn more.
Any errors that may occur in the process of developing or testing your app will show up as a "Redbox" error on the testing device. A red box will be show on the device with the error message and stack trace for the error. The Expo documentation has more information about Redbox errors.
Compilation errors or errors occurring when the expo process tries to execute commands will also show up in the browser. If you cannot fix these errors, you should refer to Expo's documentation on debugging Javascript.
-
How can I add my code to GitHub?
Pushing your code to GitHub is easy! Follow the information guide to create your repository and commit your project code.
-
How do I build a binary for the App and Play store?
Expo published an excellent guide for deploying to the Apple iTunes Store and the Google Play Store. Moreover, for users with an iOS Enterprise certifcate, Expo has information about using the certificate to build your apps.
-
What/where is the license for this code?
There's no license by default, but if you create a GitHub repository for your project code, for example, adding a license is easy.
-
Can I run Expo web with this?
Of course! See this guide by Expo for running your React Native app in a web browser.
-
What libraries does this code depend on?
You can see the full list in your projects
package.json
file (under thedependencies
section), but a few of our dependencies arereact-navigation
,react-native-screens
, andexpo-av
.