Skip to content

Repo Setup

Nathan Wilson edited this page Mar 8, 2024 · 3 revisions

This setup process was done on an M1 Mac running Sonoma 14.2.1.

  1. Get local environment setup with latest brew, Xcode, and Android Studio.
brew update
brew upgrade

My current version of Xcode is 15.2. My current version of Androids Studio is Hedgehog 2023.1.1 Patch 2

  1. Check node version is latest LTS. After updating brew, the version of node installed in brew is v21.6.2. However, this is not an LTS version. Since I have nvm installed, I used nvm ls-remote to learn that the latests LTS version is v20.11.1 and installed that using nvm install v20.11.1.

The version of watchman installed by brew is 2024.01.22.00.

  1. Create vanilla local project.
% npx react-native@latest init MushroomObserver
                                                          
               ######                ######               
             ###     ####        ####     ###             
            ##          ###    ###          ##            
            ##             ####             ##            
            ##             ####             ##            
            ##           ##    ##           ##            
            ##         ###      ###         ##            
             ##  ########################  ##             
          ######    ###            ###    ######          
      ###     ##    ##              ##    ##     ###      
   ###         ## ###      ####      ### ##         ###   
  ##           ####      ########      ####           ##  
 ##             ###     ##########     ###             ## 
  ##           ####      ########      ####           ##  
   ###         ## ###      ####      ### ##         ###   
      ###     ##    ##              ##    ##     ###      
          ######    ###            ###    ######          
             ##  ########################  ##             
            ##         ###      ###         ##            
            ##           ##    ##           ##            
            ##             ####             ##            
            ##             ####             ##            
            ##          ###    ###          ##            
             ###     ####        ####     ###             
               ######                ######               
                                                          

                  Welcome to React Native!                
                 Learn once, write anywhere               

✔ Downloading template
✔ Copying template
✔ Installing dependencies
✔ Do you want to install CocoaPods now? Only needed if you run your project in Xcode directly … yes
✔ Installing Ruby Gems
✔ Installing CocoaPods dependencies  (this may take a few minutes)


info 💡 To enable automatic CocoaPods installation when building for iOS you can create react-native.config.js with automaticPodsInstallation field. 
For more details, see https://github.com/react-native-community/cli/blob/main/docs/projects.md#projectiosautomaticpodsinstallation
            
✔ Initializing Git repository

  
  Run instructions for Android:
    • Have an Android emulator running (quickest way to get started), or a device connected.
    • cd "/Users/nathan/src/MushroomObserver" && npx react-native run-android
  
  Run instructions for iOS:
    • cd "/Users/nathan/src/MushroomObserver"
    
    • npx react-native run-ios
    - or -
    • Open MushroomObserver/ios/MushroomObserver.xcworkspace in Xcode or run "xed -b ios"
    • Hit the Run button
    
  Run instructions for macOS:
    • See https://aka.ms/ReactNativeGuideMacOS for the latest up-to-date instructions.
    
mv MushroomObserver mo-mobile
  1. Create empty repo in GitHub. Created the empty repo MushroomObserver/mo-mobile.

  2. Push local project repo to new GitHub repo.

git remote add origin [email protected]:MushroomObserver/mo-mobile.git
git push -u origin main
Clone this wiki locally