ios setup

2023-01-09 · 2 min read

install Xcode #

Either download the app directly from or install it from the Mac App Store.

Once installed, run

$ sudo xcode-select \
	--switch /Applications/
$ sudo xcodebuild -runFirstLaunch

install CocoaPods #

From the "Sudo-less Install" section:

Ensure your .bashrc contains something like:

export GEM_HOME=$HOME/.local/gem


Then install the cocoapods gem:

# sanity check
$ gem --version

$ gem install cocoapods

# sanity check
$ pod --version

ensure the iOS Simulator app works #

Search for "Simulator" in Spotlight and then open it. An emulated iPhone should pop up after a minute or so.

If the Simulator app isn't there (which it wasn't for me, even after installing Xcode), try opening and running a sample iOS app in Xcode first.

running a flutter app #

Run the iPhone simulator or attach a real device. Once hooked up, it should be visible in flutter devices:

$ flutter devices
3 connected devices:

Pixel 5a (mobile)  android-arm64 • Android 13 (API 33)
iPhone 14 Pro (mobile)  ios • iOS-16-2 (simulator)
macOS (desktop)  macos • darwin-arm64 • macOS 13.1 darwin-arm

Since I have multiple devices attached, I'll need to also specify which one to run on:

$ flutter run -d iPhone