Skip to content

chore: Upgrades to latest react-native 72 #655

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

Merged
merged 7 commits into from
Apr 9, 2025
Merged

chore: Upgrades to latest react-native 72 #655

merged 7 commits into from
Apr 9, 2025

Conversation

tuliomir
Copy link
Contributor

@tuliomir tuliomir commented Feb 20, 2025

Motivation

When trying to setup the development environment in a new MacOS machine, some issues arose with the current build process.

Ruby version

At the moment, MacOS comes with Ruby version 2.6.x installed. Even though it's possible to install dependencies with this version, it's a non-trivial activity that demands quite some time. A .tool-versions was added to inform environment managers of the version necessary for this repo.

React Native bug

The boost pod had a broken SHA256 validation that made the pod install command fail. On version 0.72.9 of React Native this bug was fixed.

We took advantage of the effort to upgrade react native and advanced it all the way to the latest 0.72.17 patch. For reference, here are the official steps suggested for upgrading those versions.

iOS Privacy file

Starting 12/Feb/2025, apps must contain a Privacy file with some configurations. See the official docs. Research was needed to understand this file structure and how to properly fill its mandatory keys. More about this on our related internal issue.

There's still a small chance that this privacy manifest file will be rejected by Apple on our first submission, but the expectation from the other developers' experience is that the rejection will show clearly what is missing/incorrect and how to fix it.

Acceptance Criteria

  • Upgrades React Native from 0.72.4 to 0.72.17
  • Adds a .tool-versions file to facilitate fixing Ruby version mismatches
  • Adds a new PrivacyInfo.xcprivacy file for compliance with iOS guidelines

Security Checklist

  • Make sure you do not include new dependencies in the project unless strictly necessary and do not include dev-dependencies as production ones. More dependencies increase the possibility of one of them being hijacked and affecting us.

Additional context

In order to test a new set of pod dependencies, it's important to purge the current ones from local caches. For reference, here is a script that helps with this cleanup.

#!/bin/bash

# Cocoapods cleanup, meant to be executed at the root folder of the project
set -e  # Exit immediately if a command exits with a non-zero status

# Node dependencies cleanup
echo "🧹 Cleaning node_modules caches..."
rm -rf node_modules

# Navigate to the iOS directory
cd ios || exit

echo "🧹 Cleaning CocoaPods caches..."
rm -rf Pods
rm -rf ~/Library/Caches/CocoaPods


echo "🧹 Cleaning Xcode DerivedData..."
rm -rf ~/Library/Developer/Xcode/DerivedData/*
rm -rf ~/Library/Developer/Xcode/Archives/*

echo "🧹 Deintegrating and cleaning CocoaPods..."
pod deintegrate


echo "✅ iOS project cleanup complete!"

@tuliomir tuliomir added the dependencies Pull requests that update a dependency file label Feb 20, 2025
@tuliomir tuliomir self-assigned this Feb 20, 2025
@tuliomir tuliomir closed this Feb 28, 2025
@tuliomir tuliomir deleted the fix/ios-build branch February 28, 2025 16:33
@github-project-automation github-project-automation bot moved this from In Progress (Done) to Waiting to be deployed in Hathor Network Feb 28, 2025
@tuliomir tuliomir restored the fix/ios-build branch February 28, 2025 16:33
@tuliomir
Copy link
Contributor Author

Closed by mistake

@tuliomir tuliomir reopened this Feb 28, 2025
@tuliomir tuliomir moved this from Waiting to be deployed to In Progress (Done) in Hathor Network Feb 28, 2025
@andreabadesso andreabadesso moved this from In Progress (Done) to In Review (WIP) in Hathor Network Mar 10, 2025
@tuliomir tuliomir moved this from In Review (WIP) to In Progress (WIP) in Hathor Network Mar 12, 2025
@tuliomir tuliomir moved this from In Progress (WIP) to In Review (WIP) in Hathor Network Mar 12, 2025
Copy link
Member

@pedroferreira1 pedroferreira1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For me this is approved except for the privacy file that still needs to be reviewed by @msbrogli

@pedroferreira1 pedroferreira1 moved this from In Review (WIP) to In Review (Done) in Hathor Network Mar 17, 2025
@github-project-automation github-project-automation bot moved this from In Review (Done) to In Review (WIP) in Hathor Network Apr 9, 2025
@tuliomir tuliomir merged commit ca1ecdc into master Apr 9, 2025
1 check passed
@github-project-automation github-project-automation bot moved this from In Review (WIP) to Waiting to be deployed in Hathor Network Apr 9, 2025
@tuliomir tuliomir deleted the fix/ios-build branch April 9, 2025 21:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
Status: Waiting to be deployed
Development

Successfully merging this pull request may close these issues.

3 participants