Today I have started learning Flutter. I am using Android Studio in Mac. I have already
Firstly, you have to install Xcode on your MacBook to develop Flutter apps for iOS
To prepare to run and test your Flutter app on the iOS simulator, follow these steps:
On your Mac, find the Simulator via Spotlight or by using the following command:
open -a Simulator
Make sure your simulator is using a 64-bit device (iPhone 5s or later) by checking the settings in the simulator’s Hardware
> Device
menu.
Depending on your development machine’s screen size, simulated high-screen-density iOS devices might overflow your screen. Grab the corner of the simulator and drag it to change the scale. You can also use the Window
> Physical Size
or Window
> Pixel Accurate
options if your computer’s resolution is high enough.
For me, this error appeared after an update of Xcode. Starting Xcode fixed the issue. Xcode asked for "Install additional required components?" and after this finished, Android Studio recognized iOS simulator.
If you don't need IDE debugger support, you can skip the overhead of launching it through the IDE, and instead simply launch the Flutter app from the command line.
Once Simulator is running, run these 2 commands:
flutter doctor
- to verify the simulator is recognized by Flutter and no other emulators are runningflutter run
- will deploy the app to the know emulator or simulatorThanks to: https://flutter.dev/docs/get-started/install/macos#create-and-run-a-simple-flutter-app