Installing Xcode on Mac for Flutter
To develop for Mac, we need Xcode. Xcode only runs on the Mac and will allow us to build Flutter apps for use on iOS devices such as iPhones and iPads.
This article will walk through installing Xcode so we can build Flutter for iOS devices.
Navigate to the XCode on the Mac App Store page and click on
Open App Store.
This will open the Apple App store app for XCode. It will display details about the Xcode application.
Click on the download icon to install Xcode.
Installing Brew and Cocoapods
Another component we need for Apple development is Cocoapods. Cocoapods is an open source package management tool for the Xcode build environment. It is necessary to install this tool as Flutter syncronizes necessary packages with the Dart environment.
We can get Cocoapods using a tool called Brew. Brew is an open source freely available installation tool for our Mac. We will need to install this first. We will open a terminal and type:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Once this is completed we can use
brew to install
We will need to open a terminal and type:
brew install cocoapods
Our Mac should now be setup for Flutter development and running Flutter apps on iOS and MacOS devices. Our next step will be to verify our Flutter environment.
While installing Xcode is not required for starting Flutter development, it is necessary to install if we want to deploy Flutter apps on iOS and MacOS devices. Let’s review a few topics we have covered in this article.
- Macs allow us to setup a development environment to target both Android and iOS devices with Xcode.
- Xcode should be installed first from the App Store on our Mac.
- We then need to install the