React Native 0.70.0 iOS RootTag issue Integrating with existing app

This issue has been tracked since 2022-09-14.

Description

I followed the instructions to integrate React Native in an existing project. For a iOS Swift project
https://reactnative.dev/docs/integration-with-existing-apps

When doing so I get the following issue roottag = 12061. and the number after = keeps increasing. The problem started on the React Native 0.70.0 update.

Please see video for example

Version

0.70.0

Output of npx react-native info

System:
OS: macOS 12.4
CPU: (8) x64 Intel(R) Core(TM) i5-1038NG7 CPU @ 2.00GHz
Memory: 4.64 GB / 16.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 18.9.0 - /usr/local/bin/node
Yarn: 1.22.17 - ~/.yarn/bin/yarn
npm: 8.19.1 - /usr/local/bin/npm
Watchman: 2022.02.07.00 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.11.3 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 21.4, iOS 15.5, macOS 12.3, tvOS 15.4, watchOS 8.5
Android SDK:
API Levels: 23, 28, 29, 30, 31
Build Tools: 30.0.2
System Images: android-29 | Google Play Intel x86 Atom, android-30 | Google APIs Intel x86 Atom_64
Android NDK: Not Found
IDEs:
Android Studio: 2021.1 AI-211.7628.21.2111.8193401
Xcode: 13.4.1/13F100 - /usr/bin/xcodebuild
Languages:
Java: 11.0.11 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 18.1.0 => 18.1.0
react-native: 0.70.0 => 0.70.0
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found

Steps to reproduce

  1. Create a brand new React project
  2. Move existing swift project to iOS folder
  3. pod init
  4. pod install
  5. yarn start to start metro
  6. yarn iOS to run the app on iPhone

Snack, code example, screenshot, or link to a repository

bug.mp4
jerryseigle wrote this answer on 2022-09-14

I can confirm this is an issue. Maybe the documentation is out of date.

In my testing I found the what you have tried works with React Native version 0.68.0 but no longer works with React Native version 0.69.0 or 0.70.0.

mikeHarris85 wrote this answer on 2022-09-15

I am having the same problem. Would be nice if the React Native team could fix this. The documentation to add react native to exist iOS project is not working. @JoshuaGross Is there anything that can be done about this?

More Details About Repo
Owner Name facebook
Repo Name react-native
Full Name facebook/react-native
Language JavaScript
Created Date 2015-01-09
Updated Date 2022-10-03
Star Count 105144
Watcher Count 3666
Fork Count 22469
Issue Count 2232

YOU MAY BE INTERESTED

Issue Title Created Date Updated Date