2
votes

I have a react-native application which comes with .xcodeproj file for ios. I upgraded the project to use cocoapods which added .xcworkspace and updated .xcodeproj file.

Now anytime i try to upgrade react-native to latest version upgrading .xcodeproj is a nightmare.

Just curious if you are facing similar issues then what is the best practice you found to deal with upgrades?

1

1 Answers

1
votes

Yes I had a lot of pain following the recommended ways. Finally, here's what I found to be a pain free way to do the upgrade:

  • $ rm package-lock.json (or npm-shrinkwrap.json, whichever you have)
  • Update package.json with the new version of React and React-Native dependencies
  • $ npm install
  • $ npm-shrinkwrap (if you had an npm-shrinkwrap.json)
  • $ rm Podfile.lock
  • $ pod install

Open workspace (*.xcworkspace) and build.

(This has worked fine when upgrading from 0.46.0 to 0.50.3 version for me)