AppDelegate.mm in react-native

AppDelegate.mm in react-native

AppDelegate.mm is a core iOS entry file in React Native iOS projects (and some native iOS apps) that acts as the bridge between iOS and your React Native app.

1. What is AppDelegate.mm?

AppDelegate.mm is the application lifecycle manager for the iOS app.

  • It is executed first when the app launches
  • It tells iOS what to do when the app starts, goes to background, foreground, etc.
  • In React Native, it is responsible for bootstrapping the JS engine and loading your React Native app


2. Why .mm and not .m?

.mm means Objective-C++

React Native iOS now uses C++ internally (Fabric, TurboModules, JSI).

  • .m → Objective-C only
  • .mm → Objective-C + C++

👉 That’s why modern RN projects use AppDelegate.mm.

3. Role of AppDelegate.mm in React Native

In a React Native app, AppDelegate.mm:

  1. Creates the React Native bridge
  2. Loads the JavaScript bundle
  3. Creates the root view
  4. Attaches the RN view to the iOS window
  5. Handles app lifecycle events

4. Push Notifications & Deep Linking

Push Notifications

AppDelegate.mm is required for:

  • APNs registration
  • Firebase setup
  • Receiving push notifications

5. When Do You Modify AppDelegate.mm?

You usually touch it when:

  • Adding Firebase / Push Notifications
  • Implementing Deep Linking
  • Integrating native SDKs
  • Configuring New Architecture
  • Adding Splash Screen / App Launch logic

One-Line Summary

AppDelegate.mm is the iOS entry point that initializes React Native, loads the JavaScript bundle, and connects native iOS with your React Native UI.

✅ Swift equivalent of AppDelegate.mm is:

👉 AppDelegate.swift

Why React Native Can’t Use Swift AppDelegate Directly

  • React Native core is written in Objective-C / C++
  • Swift cannot directly host C++
  • .mm allows Obj-C + C++ in same file
  • Swift calls C++ via Obj-C++ bridge only

That’s why RN sticks with AppDelegate.mm.

In a Swift iOS project, AppDelegate.swift (or @main App in SwiftUI) plays the same role as AppDelegate.mm in React Native, but without JavaScript bootstrapping or C++ integration.

A pure Swift iOS project does NOT need AppDelegate.mm.If you see AppDelegate.mm, the project is either React Native, Objective-C++, or incorrectly configured.

To view or add a comment, sign in

More articles by Abhishek Kumar

Explore content categories