Skip to content

Unclear Upgrade Documentation for project.pbxproj changes on iOS #3607

Closed

Description

@Shahaed

Description

The process of upgrading to newer version of react is difficult on iOS when there are xcode project/target setting changes. Especially for projects that deviate from the starter template.

What is the problem?

The upgrade tool and upgrade helper both just use git to do a diff on the starter template of the current version and the targeted upgrade version. The CLI tool is guaranteed to fail if the user has deviated from the template format or if they have integrated react native into an existing app. This is not a big deal for developer friendly files like package.json or Podfile. You can simply use the manual tool and see which packages were added/removed.

The problem is when there are xcode project/target changes. A modified ios/RnDiffApp.xcodeproj/project.pbxproj file provides a complicated diff.

How can we address it?

A simple solution is to post the exact changes to the project settings in the upgrade guides instead of just providing an file that developers aren't meant to read. For example, from v0.67.4 to v0.71.3 the "Bundle React Native code and images" script in build phases was changed and "Start Packager" was added. Instead of it being obscured in a 1000 line file like this:
image the docs could have easily told us what the changes were so users can manually go into the xcode project settings and apply them.

Why is it important?

This is a huge barrier for many people trying to upgrade

Who needs this?

iOS devs

When should this happen (use version numbers if needed)?

asap

Activity

  1. cortinico commented on Mar 6, 2023

    @cortinico
    Contributor

    Thanks for raising this @Shahaed
    We have a similar issue on Android here: react-native-community/cli#1837

    I believe this issue should be raised on either the CLI or the Upgrade Helper here:
    https://github.com/react-native-community/upgrade-helper/issues

  2. pvinis commented on May 17, 2023

    @pvinis
    Contributor

    i have tried with different tools, to sort or make that file more repeatable, but all ways have failed.

    at this point, what i do with this diff is that i ignore anything that is pods related, and only take note of the things that are not pod related. once im done with these, i run through the diff again and this time looking at the pod diffs, just to roughly make sure that the changes are equal. and what i mean is that, say in your example screenshot, i see a red export NODE, so i look further down the diff to see if there is a green export NODE on the right. then somewhere there will be a red WITH_ENV, that the green WITH_ENV is in your screenshot.

    stupidly, xcode just moves these pod things around in the file, but mostly they are just that, moved around, so no actual need to do anything. im not sure how we could completely eliminate this without using something like https://github.com/yonaskolb/XcodeGen for the template, and then treat the xcodeproj file as as a lockfile like yarn.lock, which we just ignore, since the "project setup" at taht point would be on the xcodegen file.

    if that feels like its the right move, lets do it. ive tried in the past to recreate the template app in there. not that bad. but its one more tool..

    or maybe we take something from expos book, and move some of that in a json config file, and then RN cli creates an xcodegen project file from that json config, and then we create the actual xcodeproj file, and in that case only the json config is part of the template, the other files are ignored as lockfiles.

  3. github-actions commented on Aug 16, 2023

    @github-actions

    👋 Hey there, it looks like there has been no activity on this issue in the last 90 days. Has the issue been fixed, or does it still require the community attention? This issue will be closed in the next 7 days if no further activity occurs. Thank you for your contributions.

  4. added
    StaleIssues/PR that are not getting much activity and are closer to be closed
    on Aug 16, 2023
  5. github-actions commented on Aug 24, 2023

    @github-actions

    Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    StaleIssues/PR that are not getting much activity and are closer to be closed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions