SIGN IN SIGN UP
facebook / react-native UNCLAIMED

A framework for building native applications using React

0 0 154 C++

chore(iOS): deprecate RCTAppDelegate (#49078)

Summary:
Recently, I've introduced `RCTReactNativeFactory` in this PR: https://github.com/facebook/react-native/issues/46298, which is a good successor for `RCTAppDelegate`.

### Why?

`RCTAppDelegate` introduced strong coupling between React Native and AppDelegate pattern. From iOS 13+ there is a newer equivalent (Scene Delegate) which is not possible to achieve with current architecture. The proposed solution involves migration to a `RCTReactNativeFactory` a class that encapsulates initialization logic of React Native.

This migration will make brownfield initialization easier by making it more flexible and simpler to integrate into already established apps.

### Deprecation plan

The plan I've discussed with cipolleschi involves:

- Deprecation of `RCTAppDelegate` in 0.79 (current main)
- Migration off `RCTAppDelegate` to SceneDelegate + `RCTReactNativeFactory` in 0.80

## Changelog:

[IOS] [DEPRECATED] - deprecate RCTAppDelegate

Pull Request resolved: https://github.com/facebook/react-native/pull/49078

Test Plan: Not needed

Reviewed By: cortinico

Differential Revision: D69061022

Pulled By: cipolleschi

fbshipit-source-id: b02a0ff3f26be9320da749f38c9cf083804f9f30
O
Oskar Kwaśniewski committed
74de9526ab6c1fb1f627f340653cb78d898ca698
Parent: cdc1667
Committed by Facebook GitHub Bot <facebook-github-bot@users.noreply.github.com> on 2/17/2025, 5:12:17 PM