Install the latest stable version of Xcode (using web download or the Mac App Store).
Configure the Xcode command-line tools to use the newly-installed version of Xcode by running the following from the command line:
$ sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
$ sudo xcodebuild -runFirstLaunch
This is the correct path for most cases, when you want to use the latest version of Xcode. If you need to use a different version, specify that path instead.
Make sure the Xcode license agreement is signed by either opening Xcode once and confirming or running sudo xcodebuild -license from the command line.
Set up the iOS simulator
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. Set the device scale under the Window > Scale menu in the simulator.
Create and run a simple Flutter app
Create a new Flutter app by running the following from the command line:
$ flutter create my_app.
A my_app directory is created, containing Flutter’s starter app. Enter this directory:
$ cd my_app.
To launch the app in the Simulator, ensure that the Simulator is running and enter:
$ flutter run.
Deploy to iOS devices
You need the third-party CocoaPods dependency manager and an Apple Developer account. You’ll also need to set up physical device deployment in Xcode.
Install and set up CocoaPods by running the following commands:
$ sudo gem install cocoapods
$ pod setup.
Follow the Xcode signing flow to provision your project.
Start your app by running flutter run.