Skip to content

Commit

Permalink
feat: add support for [email protected] (#2581)
Browse files Browse the repository at this point in the history
## Description

Adding support for react-native 0.77. 
After this PR is merged the library will support 0.74+ Paper and 0.77
Fabric.

Please note, that I haven't notice any not-handled breaking changes -
the library should work with versions down to 0.72 on old architecture
and at least down to 0.76 on Fabric, however we won't extend issue
resolving to these versions.

## Changes

* adjusted example apps on both architectures with changes from upgrade
helper,
* bumped `safe-area-context` to 5.0.0 (it comes with support for Paper
0.74+) in examples (not lib!),
* patched `safe-area-context`:
* AppAndFlow/react-native-safe-area-context#566
* Removed patches for and dependencies on reanimated and gesture-handler
- awaiting for support, see below 👇🏻 (comment) <-- **this must be
restored for e2e to work!!!**
* Reanimated uses [the
patch](software-mansion/react-native-reanimated#6768 (comment))
* Gesture handler has been set to [current
main](https://github.com/software-mansion/react-native-gesture-handler/tree/c3ced78e1608e63b5b3a9bca0c66cc11f4029605)



## Test code and steps to reproduce

When doing some quick checks I haven't noticed any obvious regressions.

## Checklist

- [ ] Ensured that CI passes

---------

Co-authored-by: Marc Rousavy <[email protected]>
  • Loading branch information
kkafar and mrousavy authored Jan 10, 2025
1 parent e6b9aa0 commit b4fe2c1
Show file tree
Hide file tree
Showing 49 changed files with 6,550 additions and 9,295 deletions.
1 change: 1 addition & 0 deletions Example/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ ruby ">= 2.6.10"
# Exclude problematic versions of cocoapods and activesupport that causes build failures.
gem 'cocoapods', '>= 1.13', '!= 1.15.0', '!= 1.15.1'
gem 'activesupport', '>= 6.1.7.5', '!= 7.1.0'
gem 'xcodeproj', '< 1.26.0'
4 changes: 2 additions & 2 deletions Example/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ buildscript {
minSdkVersion = 24
compileSdkVersion = 35
targetSdkVersion = 34
ndkVersion = "26.1.10909125"
kotlinVersion = "1.9.24"
ndkVersion = "27.1.12297006"
kotlinVersion = "2.0.21"
}
repositories {
google()
Expand Down
30 changes: 30 additions & 0 deletions Example/ios/AppDelegate.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import UIKit
import React
import React_RCTAppDelegate
import ReactAppDependencyProvider

@main
class AppDelegate: RCTAppDelegate {
override func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {
self.moduleName = "ScreensExample"
self.dependencyProvider = RCTAppDependencyProvider()

// You can add your custom initial props in the dictionary below.
// They will be passed down to the ViewController used by React Native.
self.initialProps = [:]

return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}

override func sourceURL(for bridge: RCTBridge) -> URL? {
self.bundleURL()
}

override func bundleURL() -> URL? {
#if DEBUG
RCTBundleURLProvider.sharedSettings().jsBundleURL(forBundleRoot: "index")
#else
Bundle.main.url(forResource: "main", withExtension: "jsbundle")
#endif
}
}
5 changes: 0 additions & 5 deletions Example/ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,6 @@ target 'ScreensExample' do
:app_path => "#{Pod::Config.instance.installation_root}/.."
)

target 'ScreensExampleTests' do
inherit! :complete
# Pods for testing
end

post_install do |installer|
# https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202
react_native_post_install(
Expand Down
Loading

0 comments on commit b4fe2c1

Please sign in to comment.