Skip to content

Instantly share code, notes, and snippets.

@KVeitch
Last active December 15, 2019 19:46
Show Gist options
  • Save KVeitch/c6cc4ff8ac85540bd5242ec6e855bd4e to your computer and use it in GitHub Desktop.
Save KVeitch/c6cc4ff8ac85540bd5242ec6e855bd4e to your computer and use it in GitHub Desktop.

sudo npm i expo-cli -g //globally installs expo command line interface (expo.io) //will need to input computer password> expo init under "Managed Workflow" select "blank" (top option) in the expo object under "name" change it to the app name cd into app directory npm start download the Expo app to phone from App Store (called Expo Client for iPhones) Scan QR code. Do not need an account on Expo for this to work //Let it build, if everything was successful your phone will have text saying "Open up App.js to start working on your app!" Android Simulator docs.expo.io --> Managed Workflow --> Android Emulator --> download Android Studio from the internet (not an app store thing) PS it's fucking huge --> Open up Android Studio once it's downloaded, go to Appearances & Behavior, then System Settings, then Android SDK --> Copy the "Android SDK Location" (should be something like /Users/sara/Library/Android/sdk) --> if using ZSH (which you are if you're using iTerm), open up your profile (can be done by typing cd .. from your root (like my terminal just has [~]) so cd up a level, ls to make sure your shit is there, open it up) --> for ZSH, go to .zshrc --> at the bottom of the file, add: export ANDROID_SDK=/Users/YOURUSERNAME/Library/Android/sdk (whatever was in that "Android SDK Location" from the app) --> Also add export PATH=/Users/YOURUSERNAME/Library/Android/sdk/platform-tools:$PATH --> COMPLETELY quit your terminal, try typing command "adb" to verify the setup worked Go back to the Android Studio app. On the initial open screen, go to bottom right and click "configure," which will show a dropdown, then select "SDK Manager" --> In the SDK Manager, make sure you have one of the latest SDKs installed (probs Pie...if it doesn't have a dessert name then it's still a beta version) --> at the top of the page, there's a tab for SDK Tools --> Make sure Android Emulator, Android SDK Platform-Tools, and Android SDK Tools are checked --> Also check Intel x86 Emulator Accelerator and Google Play Services --> Click "Apply" --> Back on the home screen for the app go back to "Configure" and now select "AVD Manager" --> Bottom left corner, click button to make new virtual device --> Best to select one that has an icon indicating that it has Google Play Store --> Click "next" --> This screen will give you option to select which Android version you want it running on (pick the latest one, probably Pie) --> Download it (this is independent from the thing that looks exactly the same that we just did) --> Click "next" --> Leave default settings alone on the next screen --> Click "finish" --> Launch emulator by clicking green "play" button In terminal, you can type 'a' to run on Android Emulator (after going back into directory and npm start-ing it because remember, we killed our terminal) --> Can also be done from the Expo CLI dev tools in the browser iOS Simulator Download XCode from the App Store and open it From the bar at the top of your screen when in XCode, click "XCode" and then "Preferences" --> go to "locations" and then for Command Line Tools, select the XCode Command Line Tools --> Go back to the top bar, click "Xcode" and then "Open Developer Tool," then "Simulator" --> Will launch a simulator. To change the device, click on it (top bar should now say "Simulator"), then select "Hardware" and under "iOS" you can choose another phone --> "i" in terminal to run project on iOS simulator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment