Articles

Installing Xcode on Mac for Flutter

To develop for Mac, we need Xcode. Xcode only runs on macOS 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.

  • This course will introduce learners to the Flutter framework with interactive lessons on basic app components.
    • Beginner Friendly.
      1 hour
  • Learn how to build iOS applications with Swift and SwiftUI and publish them to Apples' App Store.
    • Includes 7 Courses
    • With Certificate
    • Beginner Friendly.
      13 hours

How to install Xcode on Mac for Flutter

Navigate to the XCode on the Mac App Store page and click on Open App Store.

Opening the App Store

This will open the Apple App Store app for XCode. It will display details about the Xcode application.

Installing Xcode from the App Store

Click on the download icon to install Xcode.

Install Brew and Cocoapods for Flutter development

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 synchronizes necessary packages with the Dart environment.

We can get Cocoapods using a tool called Brew. Brew is an open-source and freely available installation tool for our Mac. We will need to install this first. To do this, 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 Cocoapods.

We will need to open a terminal and type:

brew install cocoapods

Our Mac should now be set up for Flutter development and running Flutter apps on iOS and macOS devices. Our next step will be to verify our Flutter environment.

Conclusion

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 set up 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 Brew and Cocoapods package managers.
Codecademy Team

'The Codecademy Team, composed of experienced educators and tech experts, is dedicated to making tech skills accessible to all. We empower learners worldwide with expert-reviewed content that develops and enhances the technical skills needed to advance and succeed in their careers.'

Meet the full team

Learn more on Codecademy

  • This course will introduce learners to the Flutter framework with interactive lessons on basic app components.
    • Beginner Friendly.
      1 hour
  • Learn how to build iOS applications with Swift and SwiftUI and publish them to Apples' App Store.
    • Includes 7 Courses
    • With Certificate
    • Beginner Friendly.
      13 hours
  • Learn how to use Swift and SwiftUI to build iOS applications.
    • Includes 26 Courses
    • With Certificate
    • Beginner Friendly.
      40 hours