Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

React Native 0.62 upgrade (Xcode) #13

Open
pvinis opened this issue Mar 27, 2020 · 0 comments
Open

React Native 0.62 upgrade (Xcode) #13

pvinis opened this issue Mar 27, 2020 · 0 comments

Comments

@pvinis
Copy link
Member

pvinis commented Mar 27, 2020

For an easy upgrade experience of the Xcode project file, do the following:

  • Upgrade all other files except the *.xcodeproj file.
  • Run yarn install
  • Run
cd ios
pod install
cd ..
  • Make sure to commit your changes so far. If some of these steps have been done before on your project, you can skip them. If for any reason any of the steps can't be applied on your project and your project runs without it, you can skip that step. If you have any problem with any of the steps, make an issue on the upgrade-support repo and let us know, so we can make these instructions better for you and others with the same problem. Now let's dive in.
  1. First easy change, the organization name:

2

Click on Project Navigator (1), then on your project at the top (2), then click on Inspectors (3) and finally on File Inspector (4). Then delete the text Facebook on the Organization field (5), and leave empty or replace it with your own text.

After this step, you should have some git changes for the organization. Feel free to commit before continuing, try to run your project and note if it runs or not.

  1. Second, you need to do a project localization migration and recommended settings update.

Screen Shot 2020-03-30 at 11 44 13

Screen Shot 2020-03-30 at 11 44 27

Click on Issue Navigator (1), then click on Update to recommended settings (2) and after that on Perform Changes (3). You might need to try to build the project (by pressing cmd-B) to have these options appear. After clicking on both, just press OK or Next and do as Xcode suggests.

After this step, you should have some git changes on the xcscheme files and on the project.pbxproj file, regarding some version upgrades, some English translations and a few options like ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES. Make sure to commit once again before continuing, try to run your project and note if it runs or not.

  1. Third step, you need to go to the Project Navigator again, like the first step, then right-click on any of the files in your project, like AppDelegate.m, and click New File....

5

A sheet will appear, select Swift File and click Next.

6

Another sheet will appear, click Create.

7

Most probably one last sheet will appear, click Create Bridging Header. If that doesn't appear, keep going.

8

In the Project Navigator, select the newly-created File.swift file, right-click it and click Delete.

9

An alert will appear, click Move to Trash.

10

After this step, you should have a bunch of git changes for SWIFT_VERSION and CLANG_ENABLE_MODULES etc. Again, commit before continuing, try to run your project and note if it runs or not.

  1. Last step, you need to edit the LIBRARY_SEARCH_PATHS setting.

11

Click on the Project Navigator like the first step, then on your project at the top like the first step. Then click on the project right above the targets (1). If you don't see this sidebar, click on the icon (0). Click on Build Settings (2) and in the search write LIBRARY_SEARCH_PATHS (3). Double-click on the empty space (4) and using the + button (5), add the three values, in order: "$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)", "$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)", "$(inherited)".

After this step you should have some git changes again, you can commit and try to run your project again, and note if it runs or not.

At this point your Xcode project upgrade should be done, your project should be running and your changes should be committed. If your project doesn't run, make sure to try to Clean the project before running by pressing cmd-option-shift-K to clean, then cmd-B to build or cmd-R to run. If you are still having some trouble, feel free to make an issue on the upgrade-support repo giving us as much info as you can about what steps you did, which one if failed on etc, and we will try to help and improve this document.

I have done the above process on a repo here, where I upgrade from a working project in 0.61 to a working project in 0.62.

@pvinis pvinis pinned this issue Mar 27, 2020
@react-native-community react-native-community locked as resolved and limited conversation to collaborators Mar 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant