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

chore: Upgrades to latest react-native 72 #655

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

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.

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
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: In Progress (Done)
Development

Successfully merging this pull request may close these issues.

1 participant