0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

🚀 MacにFlutterを使ったiOS開発環境をセットアップ

Last updated at Posted at 2025-04-06

FlutterでiOSアプリを開発するための、Mac環境でのセットアップ手順を簡単にまとめました。

公式ドキュメント

このページを見ながら取り組みました。

公式ドキュメントはとても大事。基本的にはこちらに従うのが安心です。

Rosetta 2 のインストール

Apple Silicon Mac の場合、一部Flutterのコンポーネントに Rosetta 2 が必要です。

インストール確認コマンド:

test -f /Library/Apple/usr/share/rosetta/rosetta && echo "Installed" || echo "Not installed"

未インストールの場合:

sudo softwareupdate --install-rosetta --agree-to-license

Xcode のインストールとセットアップ

FlutterでiOSアプリをビルドするにはXcodeが必須です。

Xcodeのバージョン確認:

xcodebuild -version

初期セットアップ:

sudo sh -c 'xcode-select -s /Applications/Xcode.app/Contents/Developer && xcodebuild -runFirstLaunch'

ライセンスへの同意:

sudo xcodebuild -license

CocoaPods のインストール

FlutterではCocoaPodsも必要になります。

CocoaPods の導入手順(Qiita)

VS Codeの拡張機能インストール

Flutter開発用の拡張機能をインストールしましょう。

Flutter 拡張機能(VS Code)

Flutter SDK のインストール

ダウンロードと解凍

Flutter公式サイトからmacOSに合ったSDKをダウンロードし、解凍します。

unzip ~/Downloads/flutter_macos_arm64_3.29.2-stable.zip -d ~/development/tools/

パスの設定

vi ~/.zshenv

追記:

export PATH=$HOME/development/tools/flutter/bin:$PATH

設定を反映:

exec $SHELL -l

環境チェック

最後に flutter doctor を実行して、環境が整っているか確認します。

flutter doctor

✅ が並んでいれば準備OKです。

❌ が出たら、エラー内容を読んで対応してみましょう。

これでFlutterの準備は完了です。
次は flutter create でプロジェクトを作って動かしてみましょう!

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?