0

Long story short, I got very very old RN IOS project (dependency list can show you how old) which works on only one company macbook. Thing is that this macbook has already some problems and I wished to install everything on my current mac, Unfortunately it throws many errors and I don't really know what to do with them. Project works on previous mac with XCode 12.5, I installed same version here just to make sure, also node v8.17.0 is used in previous mac so I used nvm to get same version.

Package.json

dependencies": {
    "react": "^16.4.1",
    "react-dom": "^16.4.2",
    "react-native": "0.56",
    "react-native-axios": "^0.17.1",
    "react-native-barcode-builder": "^1.0.5",
    "react-native-ble-manager": "^6.5.1",
    "react-native-bluetooth-status": "^1.3.0",
    "react-native-canvas": "^0.1.23",
    "react-native-color-matrix-image-filters": "^5.2.0",
    "react-native-cookies": "^3.3.0",
    "react-native-linear-gradient": "^2.4.2",
    "react-native-pulse": "^1.0.6",
    "react-native-restart": "0.0.7",
    "react-native-safari-view": "^2.1.0",
    "react-native-side-menu": "^1.1.3",
    "react-native-splash-screen": "^3.1.1",
    "react-native-vector-icons": "^5.0.0"
  },

So i go clone, np install and then npx react-native start, try to launch it in XCode and then build fails with: 'React/RCTBridgeModule.h' file not found in several libraries. As far as I can see in "Build Phases" > "Link binary with Libraries" they are there

enter image description here

EDIT Ok I tried to take approach signed as a answer from link in comments, it went a bit further but now it crash on:

Showing Recent Messages
Build input file cannot be found: '../node_modules/react-native/third-party/glog-0.3.4/src/vlog_is_on.cc'

Showing Recent Messages Build input file cannot be found: '../node_modules/react-native/third-party/glog-0.3.4/src/utilities.cc'

Showing Recent Messages Build input file cannot be found: '../node_modules/react-native/third-party/glog-0.3.4/src/logging.cc'

Showing Recent Messages Build input file cannot be found: '../node_modules/react-native/third-party/glog-0.3.4/src/symbolize.cc'

Jacki
  • 632
  • 3
  • 14
  • 26

1 Answers1

0

I managed to make it works! Thanks for comment it really helped me to move first step which was the hardest, so basically what I had to do, maybe it will be useful for someone who tries to launch some old project:

  1. In XCode goes to Build Phases, manually unlink all external libraries and then re-add them again
  2. Move React.xcodeproj from libraries to root folder and then in Build Phases => dependency > add React
  3. Goes with the link from comment and disable "Parallelize Build"
  4. Proceed with this link in case of glog error => https://github.com/facebook/react-native/issues/14382 (here I a bit messed up with several answers but moreless I did this yarn cache clean rm -rf node_modules yarn install and then this => https://github.com/facebook/react-native/issues/14382#issuecomment-405472763 and https://github.com/facebook/react-native/issues/14382#issuecomment-422755411)
  5. Then in case of RCTBridge error I go with this answer => https://github.com/facebook/react-native/issues/31412#issuecomment-872032401
  6. And in the end when app was succesfuly build but crash on launch I went with Solution number 2 from this link => https://blog.cpming.top/p/rn-error-unknown-argument-type-attribute-in-method
Jacki
  • 632
  • 3
  • 14
  • 26