0
0

FlutterアプリをiOSエミュレーターで起動する

Posted at

動機

起動手順だけメモ的に書いておく。

(同じ記事は星の数ほどある。)

本題

# Flutterプロジェクトを作成する
% fvm flutter create flutter-playground --verbose
# iOSエミュレーターを起動する
# 今回はiPhone 15(iOS 17.0)を選択
% open -a Simulator

# Flutterの認識しているエミュレーターを探す
% fvm flutter devices
Found 3 connected devices:
  iPhone 15 (mobile) • 1625B704-06DE-46E3-B905-2294D4E16509 • ios            • com.apple.CoreSimulator.SimRuntime.iOS-17-0 (simulator)
  macOS (desktop)    • macos                                • darwin-arm64   • macOS 13.5 22G74 darwin-arm64
  Chrome (web)       • chrome                               • web-javascript • Google Chrome 121.0.6167.184

Checking for wireless devices...

No wireless devices were found.

Run "flutter emulators" to list and start any available device emulators.

If you expected another device to be detected, please run "flutter doctor" to diagnose potential issues. You may also try increasing the time to wait for connected devices with the "--device-timeout" flag. Visit https://flutter.dev/setup/ for troubleshooting tips.

# アプリ起動
% cd flutter-playground
% fvm flutter run -d 1625B704-06DE-46E3-B905-2294D4E16509

01_simulator.png

最後に

エミュレータが起動できないときはXCodeとiOSのダウンロードから。

Androidエミュレータから起動したかったらまずはAndroid Studio落としてみると良。

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