Integrating Flutter into a Native iOS Application

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.

Author

Chayan
ChayanGrowth Marketing Specialist

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

More from the engineering frontline.

Dive deep into our research and insights on design, development, and the impact of various trends to businesses.
Insight
No More Prompt-and-Wait: Building Autonomous Agents That Act | Kamal Shree
Sep 4, 2026

No More Prompt-and-Wait: Building Autonomous Agents That Act | Kamal Shree

Kamal Shree’s Geekconf mini’s talk explores the shift to autonomous agents, from what separates agents from chatbots, the anatomy and grounding behind them, and how to choose between no-code, low-code, and pro-code build paths.

Insight
From UX to AX: Designing Applications for a World of AI Agents
Sep 4, 2026

From UX to AX: Designing Applications for a World of AI Agents

Learn how Ashita Prasad’s thegeekconf mini 2026 session explores agentic experience and three approaches to building agent-ready applications: Web MCP, MCP Apps, and A2UI.

Insight
Agentic AI: From Copilot to Autopilot | Naveen Kumar Bhansali
Sep 4, 2026

Agentic AI: From Copilot to Autopilot | Naveen Kumar Bhansali

Learn how Naveen Kumar Bhansali’s thegeekconf mini 2026 session explores AI-driven software development, context engineering, enterprise adoption, agentic workflows, and the shift toward building products for AI agents.

Insight
Agentic Commerce: What Happens When Your Agent Tries to Spend Money? | Roopasree Ranganna
Sep 4, 2026

Agentic Commerce: What Happens When Your Agent Tries to Spend Money? | Roopasree Ranganna

Learn how Roopasree Ranganna’s thegeekconf mini 2026 session explores agentic commerce, delegated payments, trust, identity, mandates, and the systems needed to enable AI agents to transact.

Events
 From MVP to Scale: Designing Architecture for AI-First Products
May 11, 2026

 From MVP to Scale: Designing Architecture for AI-First Products

A panel of architects and engineering leaders at thegeekconf mini 2026 discuss how to build and scale AI-first products — from MVP decisions to production-level challenges. The conversation covers data quality, model selection, security, token economics, and the mindset teams need to navigate a fast-moving AI landscape.

Events
The Autonomous Factory: Architecting Agentic Workflows with Clean Code Guards | Akash Kamerkar
May 5, 2026

The Autonomous Factory: Architecting Agentic Workflows with Clean Code Guards | Akash Kamerkar

Akash Kamerkar’s thegeekconf mini 2026 talk explores the ACDC framework for building safer agentic workflows with clean code guards, sandbox testing, and AI-driven software development.

Events
The Next Era of AI Builders: Building Autonomous Systems for Frontier Firms — Pallavi Lokesh Shetty
May 5, 2026

The Next Era of AI Builders: Building Autonomous Systems for Frontier Firms — Pallavi Lokesh Shetty

Discover Pallavi Shetty’s view on the next era of AI builders, covering autonomous systems, trusted agents, data quality, and frontier firms from thegeekconf mini 2026

The Right Conversation Can

Save You Six Months.

Book a call
Integrating Flutter into a Native iOS Application - GeekyAnts