Flutter - Install POD in Windows and macOS
Last Updated :
09 Jan, 2024
Flutter is an open-source UI software development kit created by Google. It is used to develop cross-platform applications from a single codebase for any web browser,[4] Fuchsia, Android, iOS, Linux, macOS, and Windows. Flutter apps are written in the Dart language and make use of many of the language's more advanced features. If you want to learn more about it you can visit this page.
In Flutter it's not common to install CocoaPods. Flutter has its package manager. You interact with it using the `pub` command. However, in cases where you're dealing with native iOS code or plugins that rely on CocoaPods you may need to interact with it.
Prerequisites needed
- Ensure you have Flutter installed on your macOS.
- Make sure you have CocoaPods installed on your macOS.
Steps to Install POD in macOS
1. Navigate to the iOS Directory
Navigate to the `ios` directory of your Flutter project in the terminal by using the below command
cd your_flutter_project/ios
2. Check for Podfile
Check if you already have a `Podfile` in the `ios` directory. If you don't have it, just run the following command in the terminal. This command will initialize a Podfile for your project.
pod init
3. Edit Podfile
Open the generated `Podfile` in a text editor of your choice and add your dependencies inside the target block.
# This is an example
platform :ios, '9.0'
target 'Runner' do
use_frameworks!
# replace 'PodDependency' with the name of the CocoaPod you want to install
pod 'PotDependency'
end
example screenshot4. Install Pods
Save the `Podfile` and run the following command. This command will install the specified CocoaPods and sets up the necessary Xcode workspace.
pod install
5. Open Xcode Workspace
Open the `.xcworkspace` file in the `ios` dir.
open Runner.xcworkspace
Note: From now on, always open the `.xcworkspace` instead of `.xcproj` when working on any Flutter project.

Steps to Install POD in Windows
Note: In order to run “pod install”, you need an actual Xcode project. Since Xcode does not run on Windows, use a macOS machine with Xcode to generate an Xcode project.
1. Install Ruby in your system
Link to download Ruby : https://rubyinstaller.org/

Run the installer
run the installerCheck the box that says "Add Ruby executables to your PATH" during installation process.
tick the checkbox2. Install CocoaPods
Run to install CocoaPods as administrator
gem install cocoapods
3. Set up Flutter Project
Create a new Flutter project .
4. Navigate to the iOS folder
Open cmd and navigate to the "ios" folder.
Note: Replace <path to your flutter project> with your path.
cd <path to your flutter project>/ios
5. Initialize CocoaPods
Run the command to initialize CocoaPods in the iOS folder:
pod init
6. Edit Podfile usinf text editor
Open the Podfile and the necessary pods for your project.
platform :ios, '9.0'
target 'Runner' do
use_frameworks!
#replace these with your pods with name and version
pod 'Firebase/Core'
pod 'AwesomeLibrary', '~> 1.0'
end
padfile example7. Install Pods
Save the "Podfile" which you just updated and run the command mentioned below
pod install
8. Open the Project
After the installation is complete, open the project using Xcode:
open Runner.xcworkspace
Note: Keep in mind that while you can set up CocoaPods on Windows, but the actual running of the iOS part might require a macOS or a virtual machine.
Similar Reads
How to Install Flutter on Windows?
Flutter is Google's portable user interface (UI) toolkit. It is used to build and develop eye-catching, natively built mobile, desktop, and web applications from a single codebase. Flutter is free, open-sourced, and compatible with existing code. Due to its user-friendly interface and fairly simple
9 min read
Flutter - Installation on macOS
In this article, we are going to take a look at Flutter installation of macOS. In this article, we will see what are the system requirement for it to work with flutter, how to set an environment variable, and how to install flutter SDK and Dart SDK. We will understand how to use flutter doctor, how
6 min read
How to Install Dart Sass in Windows?
Dart is a programming language designed for client development such as for the web and mobile apps. It is developed by Google and can also be used to build server and desktop applications. Dart is an object-oriented, class-based, garbage-collected language with C-style syntax. Dart can compile to ei
2 min read
How to Install Docker on Windows?
Before understanding the concept of Docker, let's first discuss the concept of Hypervisors. So in an IT Company, or any cooperation, there is a development team, a testing team, and an operation team for developing the application, testing it, and deploying it. Now suppose the developers are working
13 min read
How to Install Windows on Mac
Running Windows on your Mac can provide access to all the exclusive games, features, apps and the whole Windows environment. Mac is a powerful OS used for various operations but there are certain scenarios when you wish to work on a Windows system. Keeping this in mind, we have compiled this article
7 min read
How to Install Flutter in Xcode?
Flutter is open-source software. It is used to create cross-platform software from a single codebase for platforms like Android, iOS, Linux, macOS, Windows, Google Fuchsia, and the web. The integrated development environment (IDE) used by Apple to create software for macOS, iOS, iPad, watchOS, and t
2 min read
How to Install Packages in Flutter?
In this article, we will look into the process of installing packages in flutter. Before we start incorporating a package, first let's understand briefly what are Flutter Packages. Flutter packages are open source libraries of code written and maintained by someone else, which we can incorporate in
3 min read
How to Install Flutter on Visual Studio Code?
In this article, we will walk through the process of installing Flutter in Visual Studio Code. Flutter is an open-source portable UI framework for mobile, desktop, and web. It is developed and managed by Google, Flutter is used for creating a high-quality, beautiful, and fast native interface for an
4 min read
How to Install Flutter App on Android?
The hottest and trending cross-platform framework, Flutter is Google's SDK for crafting beautiful, fast user experiences for mobile, web, and desktop with just a single codebase, meaning you write for one, build for three. Flutter works with existing code, is used by developers and organizations aro
4 min read
How to Install Dart on MacOS?
The dart is an SDK (Software Development Kit) and SDK as you may observe from its name it is mainly a collection of software development tools that facilitate the creation of different applications, some of the tools include compilers debuggers libraries, and perhaps the software framework aiding to
2 min read