react-native-community / upgrade-support

A central community-backed place to request and give help when upgrading your app.
MIT License
261 stars 2 forks source link

keep or delete "REACT_NATIVE_PATH" in react-native 0.70.0 #210

Open Adnan-Bacic opened 2 years ago

Adnan-Bacic commented 2 years ago

Environment

System:
    OS: macOS 12.5.1
    CPU: (8) x64 Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz
    Memory: 43.36 MB / 16.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 16.13.2 - /private/var/folders/0g/72p3snj95yddytkgw9j2ljc00000gn/T/xfs-2504c585/node
    Yarn: 3.2.0 - /private/var/folders/0g/72p3snj95yddytkgw9j2ljc00000gn/T/xfs-2504c585/yarn
    npm: 8.1.2 - ~/.nvm/versions/node/v16.13.2/bin/npm
    Watchman: 2021.10.18.00 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.11.3 - /Users/adb/.rbenv/shims/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: 28.0.3, 29.0.2, 30.0.2, 30.0.3, 31.0.0
      System Images: android-29 | Intel x86 Atom_64, android-30 | Google APIs Intel x86 Atom, android-30 | Google Play Intel x86 Atom, android-31 | Google APIs Intel x86 Atom_64
      Android NDK: Not Found
  IDEs:
    Android Studio: 2021.2 AI-212.5712.43.2112.8815526
    Xcode: 13.4.1/13F100 - /usr/bin/xcodebuild
  Languages:
    Java: 11.0.14.1 - /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

Things I’ve done to figure out my issue

Upgrading version

0.70.0

Description

im updating from 0.69.5 to 0.70.0 and making the changes seen here: https://react-native-community.github.io/upgrade-helper/?from=0.69.5&to=0.70.0

here you can see that it says you have to delete a line in the ios/app_name.xcodeproj/project.pbxproj where it says:

- REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";

however, i also tried creating a fresh new project running 0.70.0. and when i check theios/app_name.xcodeproj/project.pbxproj file, the above line is still there.

the upgrade helper shows we have to remove this line, but a newly created project still has this line.

so either the upgrade helper is wrong or new projects are created incorrectly.

Reproducible demo

  1. create a new project running 0.70.0 with npx react-native init AwesomeProject --version 0.70.0
  2. go to the ios/app_name.xcodeproj/project.pbxproj file
  3. search the file for REACT_NATIVE_PATH. 2 results should appear. (1 under debug and 1 under release.)
hatem-72 commented 2 years ago

React native upgrade helper indications seem unclear to me as well.

If I delete the REACT_NATIVE_PATH lines

- REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";

They are added again automatically on next pod install

Same for contents.xcworkspacedata file deletion.

sciranka commented 2 years ago

The same is shown when I want to update from 0.70.3 to 0.70.4

https://react-native-community.github.io/upgrade-helper/?from=0.70.3&to=0.70.4