Apple Silicon setup - leotm/react-native-template-new-architecture GitHub Wiki

New machine

  • beta.apple.com > Guide for Beta Software > macOS
  • choose your OS package manager e.g. brew
    • adds eval "$(/opt/homebrew/bin/brew shellenv)" to shell config file
      • i.e. shell setup prepending $HOMEBREW_PREFIX/{bin,sbin} to $PATH before
        • /usr/local/bin
        • /System/Cryptexes/App/usr/bin
        • /usr/{bin,sbin}
        • /{bin,sbin}
        • /var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin
        • /var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin
        • /var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin
        • /Library/Apple/usr/bin
  • choose your shell e.g. Z shell (default)
    • brew install zsh
    • echo "$(brew --prefix)/bin/zsh" | sudo tee -a /etc/shells
    • chsh -s /opt/homebrew/bin/zsh (or via GUI System Settings)
    • choose framework or plugin manager
  • choose your terminal
  • choose your window manager
  • choose your node manager
  • choose your JS package manager
  • choose your ruby manager (e.g. rbenv)
    • use project ruby version
    • per project gem install cocoapods bundle install && bundle exec pod install
      • avoid modifying macOS system version with sudo
      • avoid project Gemfile conflicts with brew system version
  • brew install --cask zulu ⚠️🔥
    • open /opt/homebrew/Caskroom/zulu/<ver>,<ver> install JDK
  • choose your java manager e.g. jenv
    • jenv add /Library/Java/JavaVirtualMachines/zulu-25.jdk/Contents/Home
    • jenv versions
    • jenv local 25
  • choose your AI CLI agent
  • android-studio-preview@canary ⚠️🔥
    • android-studio-2025.1.4.4-mac_arm.dmg (1.43GB)
    • if boot fails, revert/downgrade to prev canary
  • Xcode (stable/rc/beta) ⚠️🔥 most Homebrew formulae need a compiler, a few need a full Xcode install
    • xcodebuild -version && lipo -archs $(which xcodebuild)
    • sudo xcode-select --switch /Applications/Xcode-beta.app
    • xcode-select --install (CLI tools)
      • /Library/Developer/CommandLineTools/usr/bin/ e.g. git, clang, gcc, make, xcrun
      • /usr/bin/ lightweight shims calling xcrun
    • sudo xcodebuild -license accept
    • xcodebuild -runFirstLaunch (then e.g. user biometric auth)
      • 2025-12-04 11:12:50.746 simctl[96714:1357866] CoreSimulator detected version change. Framework version (1051.17.7) does not match existing job version (1051.9.4). Attempting to remove the stale service in order to add the expected version.
    • xcrun simctl --version
    • xcodebuild -downloadPlatform iOS
      • iOS 26.1 Simulator (23B5059e) (arm64): 8.72 GB
      • iOS 26.2 Simulator (23C52/23C54) (arm64): 8.39 GB
  • Setting up the development environment @next ⚠️🔥 per Target OS
+
  • night shift / (flux)
  • vpn
  • git, github, gh
  • docker (requires macOS Rosetta 2 for Intel emu)
  • act
    • act --container-architecture linux/amd64 -l
    • act --container-architecture linux/amd64 -P ubuntu-latest=catthehacker/ubuntu:js-latest -j test
  • visual-studio-code@insiders ⚠️🔥
    • git config --global core.editor "code-insiders --wait"
    • iteration plan
++
  • brave-browser@nightly ⚠️🔥
    • open -a 'Brave Browser Nightly'
  • ccache
  • negative
  • reactotron
  • fastlane
  • scrcpy / vysor
  • OpenMTP/LocalSend/MacDroid
    • brew install --cask <openmtp/localsend/macdroid>
    • device: Settings>About>BuildNo (tap 7x)
    • device: Settings>System>DevOps>USBdebugging
    • adb devices

Backing up

  • macOS > Time Machine
  • Carbon Copy Cloner

Erasing


> uname -v # M2 Pro
# Darwin Kernel Version 25.0.0: Thu Aug 14 22:03:32 PDT 2025; root:xnu-12377.1.8~5/RELEASE_ARM64_T6020
# WTF is XNU? https://github.com/apple-oss-distributions/xnu

> sw_vers
# ProductName:		macOS
# ProductVersion:		26.0
# BuildVersion:		25A5349a

> ruby -v
# ruby 2.6.10p210 (2022-04-12 revision 67958) [universal.arm64e-darwin25]
# Default bins
ls -l /usr/bin /bin /usr/sbin /sbin /usr/libexec
# Default $PATH
/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin
> sfltool dumpbtm # SharedFileList BackgroundTaskManagement i.e. login items

# /Library/Launch{Daemons,Agents}
# /System/Library/Launch{Daemons,Agents}

> launchctl list
PID	Status	Label
-	0	com.apple.SafariHistoryServiceAgent
# ...

npx clear-npx-cache nb

adb reverse tcp:8081 tcp:8081 Metro <-> Android

brew update && brew outdated --greedy && brew upgrade --greedy && brew cleanup 🔥

whereis ignores $PATH

⚠️ **GitHub.com Fallback** ⚠️