Skip to content

Msue 236 upgrade react native - #47

Merged
iprysiazhnyi-sift merged 12 commits into
SiftScience:masterfrom
ostfrost:MSUE-236-upgrade-react-native
Dec 12, 2025
Merged

iprysiazhnyi-sift merged 12 commits into
SiftScience:masterfrom
ostfrost:MSUE-236-upgrade-react-native

Conversation

@ostfrost

Copy link
Copy Markdown
Contributor

Overview

This request represents a major upgrade of the sift-react-native library, updating React Native to the latest version and integrating the latest Sift iOS SDK. The changes include significant infrastructure improvements, dependency updates, and modernization of the build system.

Key Changes

🚀 React Native Upgrade

  • Upgraded React Native from 0.62.2 to 0.81.1
  • Upgraded React from 16.11.0 to 19.1.0
  • Updated all React Native related dependencies and tooling

📦 Package Manager & Build System

  • Migrated to Yarn 3.6.1 (Berry) with Plug'n'Play support
  • Added .yarnrc.yml configuration
  • Added Yarn plugins for workspace tools and interactive tools
  • Migrated build system from @react-native-community/bob to react-native-builder-bob v0.40.13
  • Added Turbo for monorepo build orchestration (turbo.json)
  • Updated package exports to use modern ESM format

🛠️ Development Tooling

  • Migrated ESLint to flat config format (eslint.config.mjs)
  • Updated ESLint to v9.35.0 with new React Native config
  • Upgraded TypeScript from v3.8.3 to v5.9.2
  • Added tsconfig.build.json for build-specific TypeScript configuration
  • Updated Prettier to v3.6.2
  • Added Lefthook for git hooks management
  • Updated Jest to v29.7.0

📱 iOS Changes

  • Migrated iOS implementation from Objective-C (.m) to Objective-C++ (.mm)
    • Renamed ios/SiftReactNative.m → ios/SiftReactNative.mm
  • Removed Xcode project files from repository (now managed by example app)
  • Updated iOS header file to use TurboModule spec
  • Updated example app:
    • Renamed from sample to SiftReactNativeExample
    • Migrated from Objective-C to Swift (AppDelegate.swift)
    • Added PrivacyInfo.xcprivacy for App Store compliance
    • Updated Podfile and dependencies

🤖 Android Changes

  • Migrated Android implementation to Kotlin
    • Converted example app from Java to Kotlin
    • Updated SiftReactNativeModule.kt and SiftReactNativePackage.kt
  • Removed old architecture files (Flipper, JNI, C++ components)
  • Updated Gradle configuration and wrapper
  • Updated Android manifest files

📝 Example App Modernization

  • Migrated example app from JavaScript to TypeScript
    • Moved App.js → src/App.tsx
  • Updated example app dependencies to match new React Native version
  • Removed Flow configuration (.flowconfig)
  • Removed Buck build system files
  • Updated Metro bundler configuration
  • Added react-native.config.js for proper monorepo support

📚 Documentation & Project Structure

  • Added CODE_OF_CONDUCT.md and CONTRIBUTING.md
  • Updated README.md with new setup instructions
  • Removed old CHANGELOG.md (likely to be regenerated)
  • Added .editorconfig and .gitattributes for consistent formatting
  • Added .nvmrc for Node.js version management
  • Added .watchmanconfig for Watchman configuration

🔧 Configuration Updates

  • Updated babel.config.js to use new React Native preset
  • Updated package.json with new scripts and dependencies
  • Updated .gitignore to exclude new build artifacts
  • Updated license file

Statistics

  • 106 files changed
  • 18,786 insertions(+), 20,943 deletions(-)
  • Net reduction of ~2,157 lines (code cleanup and modernization)

Breaking Changes

⚠️ Note: This is a major version update with breaking changes:

  • Requires React Native 0.81.1+
  • Requires React 19.1.0+
  • Requires Yarn 3.6.1+
  • iOS implementation now uses Objective-C++ instead of Objective-C
  • Android example app now uses Kotlin instead of Java
  • Build system completely changed (Bob → react-native-builder-bob)

Migration Notes

For users upgrading from previous versions:

  1. Update to Yarn 3.6.1
  2. Run yarn install to update dependencies
  3. Update React Native in your project to 0.81.1+
  4. Update React to 19.1.0+
  5. Rebuild native projects (iOS pods, Android gradle)
  6. Review breaking changes in React Native 0.81.1 release notes

Testing

  • All existing functionality should be preserved
  • Example app has been updated and tested
  • TypeScript types are properly generated
  • Build system verified with new tooling

@iprysiazhnyi-sift iprysiazhnyi-sift left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please also split the requirements for the installing and using the lib with the requirements for the working with the examples.
Add instructions how to set up the lib in ios/android projects

Comment thread README.md Outdated
Comment on lines +71 to +74
cd example/ios
bundle install # Install Ruby dependencies (first time only)
bundle exec pod install
cd ../..

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If it's required for the lib development why is it required to go into the example folder?

Comment thread README.md Outdated
implementation 'com.android.support:support-v4:27.0.2'
```bash
cd example/ios
bundle install # Install Ruby dependencies (first time only)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It looks like the Ruby should be preinstall right? Please, add instructions to install it before executing this line

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Install Ruby version manager: brew install rbenv
and run: rbenv install

Comment thread README.md Outdated
```bash
cd example/ios
bundle install # Install Ruby dependencies (first time only)
bundle exec pod install

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

it looks like the xcode version should be higher than specified in prerequirements, for this command I got the following:

React Native requires XCode >= 16.1. Found 15.4.

fun setPageName(pageName: String) {
// Some SDKs use screen name APIs differently; update if needed.
// Keeping as a no-op or adjust to your SDK’s call.
// Example: Sift.setPageName(pageName) <-- if such API exists

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

missed implementation

@iprysiazhnyi-sift
iprysiazhnyi-sift merged commit c5adcc8 into SiftScience:master Dec 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants