Skip to content

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

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

Closed
Shahaed opened this issue Mar 5, 2023 · 4 comments
Closed

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

Shahaed opened this issue Mar 5, 2023 · 4 comments
Labels
Stale Issues/PR that are not getting much activity and are closer to be closed

Comments

@Shahaed
Copy link

Shahaed commented Mar 5, 2023

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

@cortinico
Copy link
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

@pvinis
Copy link
Contributor

pvinis commented May 17, 2023

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.

@github-actions
Copy link

👋 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.

@github-actions github-actions bot added the Stale Issues/PR that are not getting much activity and are closer to be closed label Aug 16, 2023
@github-actions
Copy link

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
Labels
Stale Issues/PR that are not getting much activity and are closer to be closed
Projects
None yet
Development

No branches or pull requests

3 participants