Jan 30, 2024

Integrating Flutter into a Native iOS Application

Learn how Flutter can be integrated into a native iOS app written in Swift from Aswin Gopinathan, Software Engineer at PhonePe.

MeetUp

Author

ChayanChayanGrowth Marketing Specialist
Integrating Flutter into a Native iOS Application

Flutter is a popular cross-platform UI framework that allows developers to build mobile apps for iOS and Android from a single codebase. While Flutter provides a full-stack solution for building mobile apps, it can also be integrated into existing native apps as a module.

In this post, we'll look at how to integrate Flutter into a native iOS app written in Swift.


Setting Up the Project

To get started, we'll first create a new native iOS project using Xcode and Swift. I named my project "AddToAppDemo".

Next, we'll create a new Flutter module. I used Visual Studio Code for this and selected the "module" project type when creating the new Flutter project. I named the Flutter module "add_to_app_demo" and placed it within the same parent folder as the iOS project.

Now we have a native iOS project and a Flutter module within the same folder structure.


Connecting the iOS and Flutter Projects

To connect the two projects, we first need to configure the iOS project's podfile to import the Flutter module.

The key steps are:

  1. Specify the path to the Flutter module
  2. Specify the path to the Flutter podhelper file
  3. Add install_all_flutter_pods to install the required Flutter packages

After updating the podfile, run pod install to install the Flutter dependencies.

Now the iOS project is ready to load Flutter views.


Loading a Flutter Screen

Within the iOS code, we first need to create an instance of FlutterEngine and start it by calling run() on the engine. This initializes the Flutter environment.

When we want to show a Flutter screen, such as when tapping a button, we:

  1. Get the FlutterEngine instance
  2. Create a FlutterViewController using the engine
  3. Present the Flutter view controller using the navigation controller

This will load the Flutter UI from the module into the iOS app.

And that's the core workflow for integrating Flutter into a native iOS app! Flutter provides platform-specific build artifacts that can be embedded within the native project.


Additional Tips

A few other tips:

  • Can only import one Flutter module directly. To add multiple, create an entry point module that imports the others.
  • Flutter provides an imperative, declarative UI approach, while iOS uses an imperative approach.
  • Focus on becoming a great mobile developer rather than just a Flutter developer.

By following these steps, developers can leverage the power of Flutter while maintaining the flexibility and functionality of their existing iOS projects.

Watch the full address here 👇🏻

Subscribe to Our Newsletter

RELATED ARTICLES

More from the engineering frontline.

Dive deep into our research and insights on design, development, and the impact of various trends to businesses.
Why Legacy Systems Block Real-Time AI Decision-Making
Business

Aug 4, 2026

Why Legacy Systems Block Real-Time AI Decision-Making
Learn how legacy systems limit real-time AI decision-making and what businesses can do to build an AI-ready infrastructure.
What Makes an AI Product Enterprise-Ready? A Business Leader’s Perspective
Business

Aug 4, 2026

What Makes an AI Product Enterprise-Ready? A Business Leader’s Perspective
Most AI pilots never make it to production. Here are the five questions business leaders should ask before approving, buying, or scaling an AI product.
Building AI-Powered Banking CRM Platforms Without Replacing Core Banking Systems
Business

Jul 31, 2026

Building AI-Powered Banking CRM Platforms Without Replacing Core Banking Systems
Banks can modernize CRM with AI without replacing their core banking systems. This guide covers the architecture, use cases, governance, and roadmap to do it.
AI in Fintech: Everyone's Talking, Few are Shipping
Business

Jul 30, 2026

AI in Fintech: Everyone's Talking, Few are Shipping
This blog covers the key engineering, governance, and compliance principles required to build production-ready AI systems for financial services.
ERP and MES Integration for U.S. Pharma Manufacturers: A Roadmap to Achieve Zero-Error Production and End-to-End Traceability
Business

Jul 27, 2026

ERP and MES Integration for U.S. Pharma Manufacturers: A Roadmap to Achieve Zero-Error Production and End-to-End Traceability
A strategic roadmap for U.S. pharma leaders integrating ERP and MES to reduce production errors, accelerate batch release, strengthen compliance readiness, and enable end-to-end traceability across manufacturing sites.
How to Build Medical Device Software with AI: Compliance, Architecture, and Development Process
Business

Jul 24, 2026

How to Build Medical Device Software with AI: Compliance, Architecture, and Development Process
A guide for engineering leaders on building compliant, production-ready AI medical device software, from architecture to FDA clearance.

The Right Conversation Can Save You Six Months.

Whether you’re navigating AI adoption, modernizing legacy systems, or scaling a product - we start by listening. No pitch deck. No template. A real conversation.