From 0bf18e8d03cdcda3bf8eb580ca2acf48b3b352a9 Mon Sep 17 00:00:00 2001 From: Wojciech Lewicki Date: Thu, 21 Dec 2023 17:06:26 +0100 Subject: [PATCH 1/6] feat: try to enable bridgeless mode in the library --- FabricExample/android/app/build.gradle | 44 ++ .../java/com/fabricexample/MainApplication.kt | 2 +- .../android/app/src/main/jni/CMakeLists.txt | 34 ++ .../android/app/src/main/jni/OnLoad.cpp | 90 ++++ FabricExample/android/settings.gradle | 9 + .../FabricExample.xcodeproj/project.pbxproj | 6 +- .../ios/FabricExample/AppDelegate.mm | 22 + FabricExample/ios/Podfile.lock | 460 +++++++++--------- FabricExample/package.json | 2 +- FabricExample/yarn.lock | 251 ++++++---- RNGestureHandler.podspec | 2 +- .../react/RNGestureHandlerRootHelper.kt | 15 +- apple/RNGestureHandlerModule.h | 11 + apple/RNGestureHandlerModule.mm | 11 +- common/cpp/CMakeLists.txt | 32 ++ common/cpp/RNGHTurboCppModule.cpp | 37 ++ common/cpp/RNGHTurboCppModule.h | 20 + common/cpp/RNGHTurboCppModule.mm | 15 + package.json | 2 +- src/RNGestureHandlerModule.ts | 2 +- src/handlers/createHandler.tsx | 5 + src/init.ts | 7 +- src/specs/NativeRNGHTurboCppModule.ts | 7 + 23 files changed, 738 insertions(+), 348 deletions(-) create mode 100644 FabricExample/android/app/src/main/jni/CMakeLists.txt create mode 100644 FabricExample/android/app/src/main/jni/OnLoad.cpp create mode 100644 common/cpp/CMakeLists.txt create mode 100644 common/cpp/RNGHTurboCppModule.cpp create mode 100644 common/cpp/RNGHTurboCppModule.h create mode 100644 common/cpp/RNGHTurboCppModule.mm create mode 100644 src/specs/NativeRNGHTurboCppModule.ts diff --git a/FabricExample/android/app/build.gradle b/FabricExample/android/app/build.gradle index 4188518176..f3287efe80 100644 --- a/FabricExample/android/app/build.gradle +++ b/FabricExample/android/app/build.gradle @@ -79,6 +79,37 @@ def enableProguardInReleaseBuilds = false */ def jscFlavor = 'org.webkit:android-jsc:+' +def safeExtGet(prop, fallback) { + rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback +} + +def resolveReactNativeDirectory() { + def reactNativeLocation = safeExtGet("REACT_NATIVE_NODE_MODULES_DIR", null) + if (reactNativeLocation != null) { + return file(reactNativeLocation) + } + + // monorepo workaround + // react-native can be hoisted or in project's own node_modules + def reactNativeFromProjectNodeModules = file("${rootProject.projectDir}/../node_modules/react-native") + if (reactNativeFromProjectNodeModules.exists()) { + return reactNativeFromProjectNodeModules + } + + def reactNativeFromNodeModulesWithReanimated = file("${projectDir}/../../react-native") + if (reactNativeFromNodeModulesWithReanimated.exists()) { + return reactNativeFromNodeModulesWithReanimated + } + + throw new Exception( + "[react-native-gesture-handler] Unable to resolve react-native location in " + + "node_modules. You should add project extension property (in app/build.gradle) " + + "`REACT_NATIVE_NODE_MODULES_DIR` with path to react-native." + ) +} + +def REACT_NATIVE_DIR = resolveReactNativeDirectory() + /** * Private function to get the list of Native Architectures you want to build. * This reads the value from reactNativeArchitectures in your gradle.properties @@ -102,8 +133,21 @@ android { targetSdkVersion rootProject.ext.targetSdkVersion versionCode 1 versionName "1.0" + + externalNativeBuild { + cmake { + arguments "-DREACT_NATIVE_DIR=${REACT_NATIVE_DIR}", + "-DANDROID_STL=c++_shared" + } + } } + externalNativeBuild { + cmake { + path "src/main/jni/CMakeLists.txt" + } + } + splits { abi { reset() diff --git a/FabricExample/android/app/src/main/java/com/fabricexample/MainApplication.kt b/FabricExample/android/app/src/main/java/com/fabricexample/MainApplication.kt index 8f710d4eaf..bad586cf5e 100644 --- a/FabricExample/android/app/src/main/java/com/fabricexample/MainApplication.kt +++ b/FabricExample/android/app/src/main/java/com/fabricexample/MainApplication.kt @@ -38,7 +38,7 @@ class MainApplication : Application(), ReactApplication { SoLoader.init(this, false) if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) { // If you opted-in for the New Architecture, we load the native entry point for this app. - load() + load(bridgelessEnabled = true) } ReactNativeFlipper.initializeFlipper(this, reactNativeHost.reactInstanceManager) } diff --git a/FabricExample/android/app/src/main/jni/CMakeLists.txt b/FabricExample/android/app/src/main/jni/CMakeLists.txt new file mode 100644 index 0000000000..70eafee84e --- /dev/null +++ b/FabricExample/android/app/src/main/jni/CMakeLists.txt @@ -0,0 +1,34 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. + +# This CMake file is the default used by apps and is placed inside react-native +# to encapsulate it from user space (so you won't need to touch C++/Cmake code at all on Android). +# +# If you wish to customize it (because you want to manually link a C++ library or pass a custom +# compilation flag) you can: +# +# 1. Copy this CMake file inside the `android/app/src/main/jni` folder of your project +# 2. Copy the OnLoad.cpp (in this same folder) file inside the same folder as above. +# 3. Extend your `android/app/build.gradle` as follows +# +# android { +# // Other config here... +# externalNativeBuild { +# cmake { +# path "src/main/jni/CMakeLists.txt" +# } +# } +# } + +cmake_minimum_required(VERSION 3.13) + +# Define the library name here. +project(appmodules) + +# This file includes all the necessary to let you build your application with the New Architecture. +include(${REACT_ANDROID_DIR}/cmake-utils/ReactNative-application.cmake) +# App needs to add and link against tm (TurboModules) folder +add_subdirectory(${REACT_ANDROID_DIR}/../../../node_modules/react-native-gesture-handler/common/cpp tm_build) +target_link_libraries(${CMAKE_PROJECT_NAME} tm) \ No newline at end of file diff --git a/FabricExample/android/app/src/main/jni/OnLoad.cpp b/FabricExample/android/app/src/main/jni/OnLoad.cpp new file mode 100644 index 0000000000..550a737ac0 --- /dev/null +++ b/FabricExample/android/app/src/main/jni/OnLoad.cpp @@ -0,0 +1,90 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +// This C++ file is part of the default configuration used by apps and is placed +// inside react-native to encapsulate it from user space (so you won't need to +// touch C++/Cmake code at all on Android). +// +// If you wish to customize it (because you want to manually link a C++ library +// or pass a custom compilation flag) you can: +// +// 1. Copy this CMake file inside the `android/app/src/main/jni` folder of your +// project +// 2. Copy the OnLoad.cpp (in this same folder) file inside the same folder as +// above. +// 3. Extend your `android/app/build.gradle` as follows +// +// android { +// // Other config here... +// externalNativeBuild { +// cmake { +// path "src/main/jni/CMakeLists.txt" +// } +// } +// } + +#include +#include +#include +#include +#include +#include + +namespace facebook::react { + +void registerComponents( + std::shared_ptr registry) { + // Custom Fabric Components go here. You can register custom + // components coming from your App or from 3rd party libraries here. + // + // providerRegistry->add(concreteComponentDescriptorProvider< + // AocViewerComponentDescriptor>()); + + // By default we just use the components autolinked by RN CLI + rncli_registerProviders(registry); +} + +std::shared_ptr cxxModuleProvider( + const std::string& name, + const std::shared_ptr& jsInvoker) { + // Not implemented yet: provide pure-C++ NativeModules here. + if (name == "RNGHTurboCppModule") { + return std::make_shared(jsInvoker); + } + return nullptr; +} + +std::shared_ptr javaModuleProvider( + const std::string& name, + const JavaTurboModule::InitParams& params) { + // Here you can provide your own module provider for TurboModules coming from + // either your application or from external libraries. The approach to follow + // is similar to the following (for a library called `samplelibrary`): + // + // auto module = samplelibrary_ModuleProvider(moduleName, params); + // if (module != nullptr) { + // return module; + // } + // return rncore_ModuleProvider(moduleName, params); + + // By default we just use the module providers autolinked by RN CLI + return rncli_ModuleProvider(name, params); +} + +} // namespace facebook::react + +JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM* vm, void*) { + return facebook::jni::initialize(vm, [] { + facebook::react::DefaultTurboModuleManagerDelegate::cxxModuleProvider = + &facebook::react::cxxModuleProvider; + facebook::react::DefaultTurboModuleManagerDelegate::javaModuleProvider = + &facebook::react::javaModuleProvider; + facebook::react::DefaultComponentsRegistry:: + registerComponentDescriptorsFromEntryPoint = + &facebook::react::registerComponents; + }); +} diff --git a/FabricExample/android/settings.gradle b/FabricExample/android/settings.gradle index e5ed5d29b3..22aaecbbcc 100644 --- a/FabricExample/android/settings.gradle +++ b/FabricExample/android/settings.gradle @@ -2,3 +2,12 @@ rootProject.name = 'FabricExample' apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings) include ':app' includeBuild('../node_modules/@react-native/gradle-plugin') + +includeBuild('../node_modules/react-native') { + dependencySubstitution { + substitute(module("com.facebook.react:react-android")).using(project(":packages:react-native:ReactAndroid")) + substitute(module("com.facebook.react:react-native")).using(project(":packages:react-native:ReactAndroid")) + substitute(module("com.facebook.react:hermes-android")).using(project(":packages:react-native:ReactAndroid:hermes-engine")) + substitute(module("com.facebook.react:hermes-engine")).using(project(":packages:react-native:ReactAndroid:hermes-engine")) + } +} \ No newline at end of file diff --git a/FabricExample/ios/FabricExample.xcodeproj/project.pbxproj b/FabricExample/ios/FabricExample.xcodeproj/project.pbxproj index a748eb43be..d0d8605086 100644 --- a/FabricExample/ios/FabricExample.xcodeproj/project.pbxproj +++ b/FabricExample/ios/FabricExample.xcodeproj/project.pbxproj @@ -605,7 +605,8 @@ ); OTHER_LDFLAGS = ( "$(inherited)", - " ", + "-Wl", + "-ld_classic", ); REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native"; SDKROOT = iphoneos; @@ -679,7 +680,8 @@ ); OTHER_LDFLAGS = ( "$(inherited)", - " ", + "-Wl", + "-ld_classic", ); REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native"; SDKROOT = iphoneos; diff --git a/FabricExample/ios/FabricExample/AppDelegate.mm b/FabricExample/ios/FabricExample/AppDelegate.mm index 04f5ea2dbc..514b94d70d 100644 --- a/FabricExample/ios/FabricExample/AppDelegate.mm +++ b/FabricExample/ios/FabricExample/AppDelegate.mm @@ -1,6 +1,12 @@ #import "AppDelegate.h" #import +#import +#import +#import + +@interface AppDelegate () {} +@end @implementation AppDelegate @@ -19,6 +25,22 @@ - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge return [self getBundleURL]; } +- (BOOL)bridgelessEnabled +{ + return YES; +} + +#pragma mark RCTTurboModuleManagerDelegate + +- (std::shared_ptr)getTurboModule:(const std::string &)name + jsInvoker:(std::shared_ptr)jsInvoker +{ + if (name == "RNGHTurboCppModule") { + return std::make_shared(jsInvoker); + } + return nullptr; +} + - (NSURL *)getBundleURL { #if DEBUG diff --git a/FabricExample/ios/Podfile.lock b/FabricExample/ios/Podfile.lock index d9ae5d293f..ca4dc969a0 100644 --- a/FabricExample/ios/Podfile.lock +++ b/FabricExample/ios/Podfile.lock @@ -2,7 +2,7 @@ PODS: - boost (1.83.0) - CocoaAsyncSocket (7.6.5) - DoubleConversion (1.1.6) - - FBLazyVector (0.73.0-rc.5) + - FBLazyVector (0.73.0) - Flipper (0.201.0): - Flipper-Folly (~> 2.6) - Flipper-Boost-iOSX (1.76.0.1.11) @@ -61,9 +61,9 @@ PODS: - FlipperKit/FlipperKitNetworkPlugin - fmt (6.2.1) - glog (0.3.5) - - hermes-engine (0.73.0-rc.5): - - hermes-engine/Pre-built (= 0.73.0-rc.5) - - hermes-engine/Pre-built (0.73.0-rc.5) + - hermes-engine (0.73.0): + - hermes-engine/Pre-built (= 0.73.0) + - hermes-engine/Pre-built (0.73.0) - libevent (2.1.12) - OpenSSL-Universal (1.1.1100) - RCT-Folly (2022.05.16.00): @@ -88,26 +88,26 @@ PODS: - fmt (~> 6.2.1) - glog - libevent - - RCTRequired (0.73.0-rc.5) - - RCTTypeSafety (0.73.0-rc.5): - - FBLazyVector (= 0.73.0-rc.5) - - RCTRequired (= 0.73.0-rc.5) - - React-Core (= 0.73.0-rc.5) - - React (0.73.0-rc.5): - - React-Core (= 0.73.0-rc.5) - - React-Core/DevSupport (= 0.73.0-rc.5) - - React-Core/RCTWebSocket (= 0.73.0-rc.5) - - React-RCTActionSheet (= 0.73.0-rc.5) - - React-RCTAnimation (= 0.73.0-rc.5) - - React-RCTBlob (= 0.73.0-rc.5) - - React-RCTImage (= 0.73.0-rc.5) - - React-RCTLinking (= 0.73.0-rc.5) - - React-RCTNetwork (= 0.73.0-rc.5) - - React-RCTSettings (= 0.73.0-rc.5) - - React-RCTText (= 0.73.0-rc.5) - - React-RCTVibration (= 0.73.0-rc.5) - - React-callinvoker (0.73.0-rc.5) - - React-Codegen (0.73.0-rc.5): + - RCTRequired (0.73.0) + - RCTTypeSafety (0.73.0): + - FBLazyVector (= 0.73.0) + - RCTRequired (= 0.73.0) + - React-Core (= 0.73.0) + - React (0.73.0): + - React-Core (= 0.73.0) + - React-Core/DevSupport (= 0.73.0) + - React-Core/RCTWebSocket (= 0.73.0) + - React-RCTActionSheet (= 0.73.0) + - React-RCTAnimation (= 0.73.0) + - React-RCTBlob (= 0.73.0) + - React-RCTImage (= 0.73.0) + - React-RCTLinking (= 0.73.0) + - React-RCTNetwork (= 0.73.0) + - React-RCTSettings (= 0.73.0) + - React-RCTText (= 0.73.0) + - React-RCTVibration (= 0.73.0) + - React-callinvoker (0.73.0) + - React-Codegen (0.73.0): - DoubleConversion - glog - hermes-engine @@ -117,6 +117,7 @@ PODS: - React-Core - React-debug - React-Fabric + - React-FabricImage - React-graphics - React-jsi - React-jsiexecutor @@ -125,11 +126,11 @@ PODS: - React-utils - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - - React-Core (0.73.0-rc.5): + - React-Core (0.73.0): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-Core/Default (= 0.73.0-rc.5) + - React-Core/Default (= 0.73.0) - React-cxxreact - React-hermes - React-jsi @@ -139,7 +140,7 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/CoreModulesHeaders (0.73.0-rc.5): + - React-Core/CoreModulesHeaders (0.73.0): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -153,7 +154,7 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/Default (0.73.0-rc.5): + - React-Core/Default (0.73.0): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -166,23 +167,23 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/DevSupport (0.73.0-rc.5): + - React-Core/DevSupport (0.73.0): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-Core/Default (= 0.73.0-rc.5) - - React-Core/RCTWebSocket (= 0.73.0-rc.5) + - React-Core/Default (= 0.73.0) + - React-Core/RCTWebSocket (= 0.73.0) - React-cxxreact - React-hermes - React-jsi - React-jsiexecutor - - React-jsinspector (= 0.73.0-rc.5) + - React-jsinspector (= 0.73.0) - React-perflogger - React-runtimescheduler - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/RCTActionSheetHeaders (0.73.0-rc.5): + - React-Core/RCTActionSheetHeaders (0.73.0): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -196,7 +197,7 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/RCTAnimationHeaders (0.73.0-rc.5): + - React-Core/RCTAnimationHeaders (0.73.0): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -210,7 +211,7 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/RCTBlobHeaders (0.73.0-rc.5): + - React-Core/RCTBlobHeaders (0.73.0): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -224,7 +225,7 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/RCTImageHeaders (0.73.0-rc.5): + - React-Core/RCTImageHeaders (0.73.0): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -238,7 +239,7 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/RCTLinkingHeaders (0.73.0-rc.5): + - React-Core/RCTLinkingHeaders (0.73.0): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -252,7 +253,7 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/RCTNetworkHeaders (0.73.0-rc.5): + - React-Core/RCTNetworkHeaders (0.73.0): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -266,7 +267,7 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/RCTSettingsHeaders (0.73.0-rc.5): + - React-Core/RCTSettingsHeaders (0.73.0): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -280,7 +281,7 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/RCTTextHeaders (0.73.0-rc.5): + - React-Core/RCTTextHeaders (0.73.0): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -294,7 +295,7 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/RCTVibrationHeaders (0.73.0-rc.5): + - React-Core/RCTVibrationHeaders (0.73.0): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -308,11 +309,11 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/RCTWebSocket (0.73.0-rc.5): + - React-Core/RCTWebSocket (0.73.0): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-Core/Default (= 0.73.0-rc.5) + - React-Core/Default (= 0.73.0) - React-cxxreact - React-hermes - React-jsi @@ -322,33 +323,33 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-CoreModules (0.73.0-rc.5): + - React-CoreModules (0.73.0): - RCT-Folly (= 2022.05.16.00) - - RCTTypeSafety (= 0.73.0-rc.5) + - RCTTypeSafety (= 0.73.0) - React-Codegen - - React-Core/CoreModulesHeaders (= 0.73.0-rc.5) - - React-jsi (= 0.73.0-rc.5) + - React-Core/CoreModulesHeaders (= 0.73.0) + - React-jsi (= 0.73.0) - React-NativeModulesApple - React-RCTBlob - - React-RCTImage (= 0.73.0-rc.5) + - React-RCTImage (= 0.73.0) - ReactCommon - SocketRocket (= 0.6.1) - - React-cxxreact (0.73.0-rc.5): + - React-cxxreact (0.73.0): - boost (= 1.83.0) - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-callinvoker (= 0.73.0-rc.5) - - React-debug (= 0.73.0-rc.5) - - React-jsi (= 0.73.0-rc.5) - - React-jsinspector (= 0.73.0-rc.5) - - React-logger (= 0.73.0-rc.5) - - React-perflogger (= 0.73.0-rc.5) - - React-runtimeexecutor (= 0.73.0-rc.5) - - React-debug (0.73.0-rc.5) - - React-Fabric (0.73.0-rc.5): + - React-callinvoker (= 0.73.0) + - React-debug (= 0.73.0) + - React-jsi (= 0.73.0) + - React-jsinspector (= 0.73.0) + - React-logger (= 0.73.0) + - React-perflogger (= 0.73.0) + - React-runtimeexecutor (= 0.73.0) + - React-debug (0.73.0) + - React-Fabric (0.73.0): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -359,20 +360,20 @@ PODS: - React-Core - React-cxxreact - React-debug - - React-Fabric/animations (= 0.73.0-rc.5) - - React-Fabric/attributedstring (= 0.73.0-rc.5) - - React-Fabric/componentregistry (= 0.73.0-rc.5) - - React-Fabric/componentregistrynative (= 0.73.0-rc.5) - - React-Fabric/components (= 0.73.0-rc.5) - - React-Fabric/core (= 0.73.0-rc.5) - - React-Fabric/imagemanager (= 0.73.0-rc.5) - - React-Fabric/leakchecker (= 0.73.0-rc.5) - - React-Fabric/mounting (= 0.73.0-rc.5) - - React-Fabric/scheduler (= 0.73.0-rc.5) - - React-Fabric/telemetry (= 0.73.0-rc.5) - - React-Fabric/templateprocessor (= 0.73.0-rc.5) - - React-Fabric/textlayoutmanager (= 0.73.0-rc.5) - - React-Fabric/uimanager (= 0.73.0-rc.5) + - React-Fabric/animations (= 0.73.0) + - React-Fabric/attributedstring (= 0.73.0) + - React-Fabric/componentregistry (= 0.73.0) + - React-Fabric/componentregistrynative (= 0.73.0) + - React-Fabric/components (= 0.73.0) + - React-Fabric/core (= 0.73.0) + - React-Fabric/imagemanager (= 0.73.0) + - React-Fabric/leakchecker (= 0.73.0) + - React-Fabric/mounting (= 0.73.0) + - React-Fabric/scheduler (= 0.73.0) + - React-Fabric/telemetry (= 0.73.0) + - React-Fabric/templateprocessor (= 0.73.0) + - React-Fabric/textlayoutmanager (= 0.73.0) + - React-Fabric/uimanager (= 0.73.0) - React-graphics - React-jsi - React-jsiexecutor @@ -381,7 +382,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/animations (0.73.0-rc.5): + - React-Fabric/animations (0.73.0): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -400,7 +401,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/attributedstring (0.73.0-rc.5): + - React-Fabric/attributedstring (0.73.0): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -419,7 +420,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/componentregistry (0.73.0-rc.5): + - React-Fabric/componentregistry (0.73.0): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -438,7 +439,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/componentregistrynative (0.73.0-rc.5): + - React-Fabric/componentregistrynative (0.73.0): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -457,7 +458,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components (0.73.0-rc.5): + - React-Fabric/components (0.73.0): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -468,17 +469,17 @@ PODS: - React-Core - React-cxxreact - React-debug - - React-Fabric/components/inputaccessory (= 0.73.0-rc.5) - - React-Fabric/components/legacyviewmanagerinterop (= 0.73.0-rc.5) - - React-Fabric/components/modal (= 0.73.0-rc.5) - - React-Fabric/components/rncore (= 0.73.0-rc.5) - - React-Fabric/components/root (= 0.73.0-rc.5) - - React-Fabric/components/safeareaview (= 0.73.0-rc.5) - - React-Fabric/components/scrollview (= 0.73.0-rc.5) - - React-Fabric/components/text (= 0.73.0-rc.5) - - React-Fabric/components/textinput (= 0.73.0-rc.5) - - React-Fabric/components/unimplementedview (= 0.73.0-rc.5) - - React-Fabric/components/view (= 0.73.0-rc.5) + - React-Fabric/components/inputaccessory (= 0.73.0) + - React-Fabric/components/legacyviewmanagerinterop (= 0.73.0) + - React-Fabric/components/modal (= 0.73.0) + - React-Fabric/components/rncore (= 0.73.0) + - React-Fabric/components/root (= 0.73.0) + - React-Fabric/components/safeareaview (= 0.73.0) + - React-Fabric/components/scrollview (= 0.73.0) + - React-Fabric/components/text (= 0.73.0) + - React-Fabric/components/textinput (= 0.73.0) + - React-Fabric/components/unimplementedview (= 0.73.0) + - React-Fabric/components/view (= 0.73.0) - React-graphics - React-jsi - React-jsiexecutor @@ -487,7 +488,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components/inputaccessory (0.73.0-rc.5): + - React-Fabric/components/inputaccessory (0.73.0): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -506,7 +507,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components/legacyviewmanagerinterop (0.73.0-rc.5): + - React-Fabric/components/legacyviewmanagerinterop (0.73.0): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -525,7 +526,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components/modal (0.73.0-rc.5): + - React-Fabric/components/modal (0.73.0): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -544,7 +545,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components/rncore (0.73.0-rc.5): + - React-Fabric/components/rncore (0.73.0): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -563,7 +564,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components/root (0.73.0-rc.5): + - React-Fabric/components/root (0.73.0): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -582,7 +583,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components/safeareaview (0.73.0-rc.5): + - React-Fabric/components/safeareaview (0.73.0): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -601,7 +602,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components/scrollview (0.73.0-rc.5): + - React-Fabric/components/scrollview (0.73.0): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -620,7 +621,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components/text (0.73.0-rc.5): + - React-Fabric/components/text (0.73.0): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -639,7 +640,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components/textinput (0.73.0-rc.5): + - React-Fabric/components/textinput (0.73.0): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -658,7 +659,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components/unimplementedview (0.73.0-rc.5): + - React-Fabric/components/unimplementedview (0.73.0): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -677,7 +678,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components/view (0.73.0-rc.5): + - React-Fabric/components/view (0.73.0): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -697,7 +698,7 @@ PODS: - React-utils - ReactCommon/turbomodule/core - Yoga - - React-Fabric/core (0.73.0-rc.5): + - React-Fabric/core (0.73.0): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -716,7 +717,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/imagemanager (0.73.0-rc.5): + - React-Fabric/imagemanager (0.73.0): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -735,7 +736,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/leakchecker (0.73.0-rc.5): + - React-Fabric/leakchecker (0.73.0): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -754,7 +755,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/mounting (0.73.0-rc.5): + - React-Fabric/mounting (0.73.0): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -773,7 +774,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/scheduler (0.73.0-rc.5): + - React-Fabric/scheduler (0.73.0): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -792,7 +793,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/telemetry (0.73.0-rc.5): + - React-Fabric/telemetry (0.73.0): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -811,7 +812,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/templateprocessor (0.73.0-rc.5): + - React-Fabric/templateprocessor (0.73.0): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -830,7 +831,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/textlayoutmanager (0.73.0-rc.5): + - React-Fabric/textlayoutmanager (0.73.0): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -850,7 +851,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/uimanager (0.73.0-rc.5): + - React-Fabric/uimanager (0.73.0): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -869,82 +870,81 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-FabricImage (0.73.0-rc.5): + - React-FabricImage (0.73.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.5) - - RCTTypeSafety (= 0.73.0-rc.5) + - RCTRequired (= 0.73.0) + - RCTTypeSafety (= 0.73.0) - React-Fabric - React-graphics - React-ImageManager - React-jsi - - React-jsiexecutor (= 0.73.0-rc.5) + - React-jsiexecutor (= 0.73.0) - React-logger - React-rendererdebug - React-utils - ReactCommon - Yoga - - React-graphics (0.73.0-rc.5): + - React-graphics (0.73.0): - glog - RCT-Folly/Fabric (= 2022.05.16.00) - - React-Core/Default (= 0.73.0-rc.5) + - React-Core/Default (= 0.73.0) - React-utils - - React-hermes (0.73.0-rc.5): + - React-hermes (0.73.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - RCT-Folly/Futures (= 2022.05.16.00) - - React-cxxreact (= 0.73.0-rc.5) + - React-cxxreact (= 0.73.0) - React-jsi - - React-jsiexecutor (= 0.73.0-rc.5) - - React-jsinspector (= 0.73.0-rc.5) - - React-perflogger (= 0.73.0-rc.5) - - React-ImageManager (0.73.0-rc.5): + - React-jsiexecutor (= 0.73.0) + - React-jsinspector (= 0.73.0) + - React-perflogger (= 0.73.0) + - React-ImageManager (0.73.0): - glog - RCT-Folly/Fabric - React-Core/Default - React-debug - React-Fabric - React-graphics - - React-RCTImage - React-rendererdebug - React-utils - - React-jserrorhandler (0.73.0-rc.5): + - React-jserrorhandler (0.73.0): - RCT-Folly/Fabric (= 2022.05.16.00) - React-debug - React-jsi - React-Mapbuffer - - React-jsi (0.73.0-rc.5): + - React-jsi (0.73.0): - boost (= 1.83.0) - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-jsiexecutor (0.73.0-rc.5): + - React-jsiexecutor (0.73.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-cxxreact (= 0.73.0-rc.5) - - React-jsi (= 0.73.0-rc.5) - - React-perflogger (= 0.73.0-rc.5) - - React-jsinspector (0.73.0-rc.5) - - React-jsitracing (0.73.0-rc.5): + - React-cxxreact (= 0.73.0) + - React-jsi (= 0.73.0) + - React-perflogger (= 0.73.0) + - React-jsinspector (0.73.0) + - React-jsitracing (0.73.0): - React-jsi - - React-logger (0.73.0-rc.5): + - React-logger (0.73.0): - glog - - React-Mapbuffer (0.73.0-rc.5): + - React-Mapbuffer (0.73.0): - glog - React-debug - - React-nativeconfig (0.73.0-rc.5) - - React-NativeModulesApple (0.73.0-rc.5): + - React-nativeconfig (0.73.0) + - React-NativeModulesApple (0.73.0): - glog - hermes-engine - React-callinvoker @@ -954,10 +954,10 @@ PODS: - React-runtimeexecutor - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - - React-perflogger (0.73.0-rc.5) - - React-RCTActionSheet (0.73.0-rc.5): - - React-Core/RCTActionSheetHeaders (= 0.73.0-rc.5) - - React-RCTAnimation (0.73.0-rc.5): + - React-perflogger (0.73.0) + - React-RCTActionSheet (0.73.0): + - React-Core/RCTActionSheetHeaders (= 0.73.0) + - React-RCTAnimation (0.73.0): - RCT-Folly (= 2022.05.16.00) - RCTTypeSafety - React-Codegen @@ -965,7 +965,7 @@ PODS: - React-jsi - React-NativeModulesApple - ReactCommon - - React-RCTAppDelegate (0.73.0-rc.5): + - React-RCTAppDelegate (0.73.0): - RCT-Folly - RCTRequired - RCTTypeSafety @@ -987,7 +987,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon - - React-RCTBlob (0.73.0-rc.5): + - React-RCTBlob (0.73.0): - hermes-engine - RCT-Folly (= 2022.05.16.00) - React-Codegen @@ -997,7 +997,7 @@ PODS: - React-NativeModulesApple - React-RCTNetwork - ReactCommon - - React-RCTFabric (0.73.0-rc.5): + - React-RCTFabric (0.73.0): - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) @@ -1015,7 +1015,7 @@ PODS: - React-runtimescheduler - React-utils - Yoga - - React-RCTImage (0.73.0-rc.5): + - React-RCTImage (0.73.0): - RCT-Folly (= 2022.05.16.00) - RCTTypeSafety - React-Codegen @@ -1024,14 +1024,14 @@ PODS: - React-NativeModulesApple - React-RCTNetwork - ReactCommon - - React-RCTLinking (0.73.0-rc.5): + - React-RCTLinking (0.73.0): - React-Codegen - - React-Core/RCTLinkingHeaders (= 0.73.0-rc.5) - - React-jsi (= 0.73.0-rc.5) + - React-Core/RCTLinkingHeaders (= 0.73.0) + - React-jsi (= 0.73.0) - React-NativeModulesApple - ReactCommon - - ReactCommon/turbomodule/core (= 0.73.0-rc.5) - - React-RCTNetwork (0.73.0-rc.5): + - ReactCommon/turbomodule/core (= 0.73.0) + - React-RCTNetwork (0.73.0): - RCT-Folly (= 2022.05.16.00) - RCTTypeSafety - React-Codegen @@ -1039,7 +1039,7 @@ PODS: - React-jsi - React-NativeModulesApple - ReactCommon - - React-RCTSettings (0.73.0-rc.5): + - React-RCTSettings (0.73.0): - RCT-Folly (= 2022.05.16.00) - RCTTypeSafety - React-Codegen @@ -1047,23 +1047,23 @@ PODS: - React-jsi - React-NativeModulesApple - ReactCommon - - React-RCTText (0.73.0-rc.5): - - React-Core/RCTTextHeaders (= 0.73.0-rc.5) + - React-RCTText (0.73.0): + - React-Core/RCTTextHeaders (= 0.73.0) - Yoga - - React-RCTVibration (0.73.0-rc.5): + - React-RCTVibration (0.73.0): - RCT-Folly (= 2022.05.16.00) - React-Codegen - React-Core/RCTVibrationHeaders - React-jsi - React-NativeModulesApple - ReactCommon - - React-rendererdebug (0.73.0-rc.5): + - React-rendererdebug (0.73.0): - DoubleConversion - fmt (~> 6.2.1) - RCT-Folly (= 2022.05.16.00) - React-debug - - React-rncore (0.73.0-rc.5) - - React-RuntimeApple (0.73.0-rc.5): + - React-rncore (0.73.0) + - React-RuntimeApple (0.73.0): - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - React-callinvoker @@ -1080,7 +1080,7 @@ PODS: - React-runtimeexecutor - React-RuntimeHermes - React-utils - - React-RuntimeCore (0.73.0-rc.5): + - React-RuntimeCore (0.73.0): - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) @@ -1090,16 +1090,16 @@ PODS: - React-jsiexecutor - React-runtimeexecutor - React-runtimescheduler - - React-runtimeexecutor (0.73.0-rc.5): - - React-jsi (= 0.73.0-rc.5) - - React-RuntimeHermes (0.73.0-rc.5): + - React-runtimeexecutor (0.73.0): + - React-jsi (= 0.73.0) + - React-RuntimeHermes (0.73.0): - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - React-jsi - React-jsitracing - React-nativeconfig - React-utils - - React-runtimescheduler (0.73.0-rc.5): + - React-runtimescheduler (0.73.0): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -1110,48 +1110,48 @@ PODS: - React-rendererdebug - React-runtimeexecutor - React-utils - - React-utils (0.73.0-rc.5): + - React-utils (0.73.0): - glog - RCT-Folly (= 2022.05.16.00) - React-debug - - ReactCommon (0.73.0-rc.5): - - React-logger (= 0.73.0-rc.5) - - ReactCommon/turbomodule (= 0.73.0-rc.5) - - ReactCommon/turbomodule (0.73.0-rc.5): + - ReactCommon (0.73.0): + - React-logger (= 0.73.0) + - ReactCommon/turbomodule (= 0.73.0) + - ReactCommon/turbomodule (0.73.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-callinvoker (= 0.73.0-rc.5) - - React-cxxreact (= 0.73.0-rc.5) - - React-jsi (= 0.73.0-rc.5) - - React-logger (= 0.73.0-rc.5) - - React-perflogger (= 0.73.0-rc.5) - - ReactCommon/turbomodule/bridging (= 0.73.0-rc.5) - - ReactCommon/turbomodule/core (= 0.73.0-rc.5) - - ReactCommon/turbomodule/bridging (0.73.0-rc.5): + - React-callinvoker (= 0.73.0) + - React-cxxreact (= 0.73.0) + - React-jsi (= 0.73.0) + - React-logger (= 0.73.0) + - React-perflogger (= 0.73.0) + - ReactCommon/turbomodule/bridging (= 0.73.0) + - ReactCommon/turbomodule/core (= 0.73.0) + - ReactCommon/turbomodule/bridging (0.73.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-callinvoker (= 0.73.0-rc.5) - - React-cxxreact (= 0.73.0-rc.5) - - React-jsi (= 0.73.0-rc.5) - - React-logger (= 0.73.0-rc.5) - - React-perflogger (= 0.73.0-rc.5) - - ReactCommon/turbomodule/core (0.73.0-rc.5): + - React-callinvoker (= 0.73.0) + - React-cxxreact (= 0.73.0) + - React-jsi (= 0.73.0) + - React-logger (= 0.73.0) + - React-perflogger (= 0.73.0) + - ReactCommon/turbomodule/core (0.73.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-callinvoker (= 0.73.0-rc.5) - - React-cxxreact (= 0.73.0-rc.5) - - React-jsi (= 0.73.0-rc.5) - - React-logger (= 0.73.0-rc.5) - - React-perflogger (= 0.73.0-rc.5) + - React-callinvoker (= 0.73.0) + - React-cxxreact (= 0.73.0) + - React-jsi (= 0.73.0) + - React-logger (= 0.73.0) + - React-perflogger (= 0.73.0) - RNGestureHandler (2.14.0): - glog - hermes-engine @@ -1380,7 +1380,7 @@ SPEC CHECKSUMS: boost: 26fad476bfa736552bbfa698a06cc530475c1505 CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99 DoubleConversion: fea03f2699887d960129cc54bba7e52542b6f953 - FBLazyVector: ff4684184a6596b7c4d7a12b07230df063a6810f + FBLazyVector: 39ba45baf4e398618f8b3a4bb6ba8fcdb7fc2133 Flipper: c7a0093234c4bdd456e363f2f19b2e4b27652d44 Flipper-Boost-iOSX: fd1e2b8cbef7e662a122412d7ac5f5bea715403c Flipper-DoubleConversion: 2dc99b02f658daf147069aad9dbd29d8feb06d30 @@ -1391,57 +1391,57 @@ SPEC CHECKSUMS: FlipperKit: 37525a5d056ef9b93d1578e04bc3ea1de940094f fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9 glog: c5d68082e772fa1c511173d6b30a9de2c05a69a2 - hermes-engine: f8faecb17f642424e5c70d0cf50cf2568f4c2c83 + hermes-engine: 34304f8c6e8fa68f63a5fe29af82f227d817d7a7 libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913 OpenSSL-Universal: ebc357f1e6bc71fa463ccb2fe676756aff50e88c RCT-Folly: 7169b2b1c44399c76a47b5deaaba715eeeb476c0 - RCTRequired: 52f38ab2b9ce8b0d713fa394895a0c60c22cad6a - RCTTypeSafety: 834daf2695e2766d0a08082403a6c622e3581a36 - React: ae410e0d71bdbce181d7e5fdde31bf3dec8861ef - React-callinvoker: adcef32af8fd0558a6790969610fc3e96368732f - React-Codegen: 5cf166aea33a4d7503b3d823f527785685e6b305 - React-Core: d9b9a00aecd051ff919d2def123d91a158744897 - React-CoreModules: 49698ebd4f456668c26f4e19b42fd61721d258b3 - React-cxxreact: d7ec1e7a83b063998341a9b65f5854f020a172f7 - React-debug: b27df7971c67877bc7ccbea0ff87fe630e33cd03 - React-Fabric: e8d1027506cf99f7c2d89f1ee516a8699a499a5b - React-FabricImage: c58f0b34fe2d4d72ddc4ede3be1ca706e0f78db7 - React-graphics: 609f00796ef90ab40bb7fcf827987a463ebfc584 - React-hermes: a2b258069b57823b6b93f9cf2110f3321d36d9e8 - React-ImageManager: 4c75c2c56949693df52a2fe59ae3113222fd829e - React-jserrorhandler: 24ec1c0f242850296e84d6dfd433417a31bb3624 - React-jsi: 84df4e55c583fbc8af83da558799a4bedfc3e7f0 - React-jsiexecutor: d5fa8c5107577a0f51e42828a4305716a19442c7 - React-jsinspector: 6b007a99908c40ee9e4005f00552a766fe470f06 - React-jsitracing: a63d52ed2ad656fc2274361981fea4028e1b54c4 - React-logger: bced7740cd78c496573c4dc9fd8120a8e19660ad - React-Mapbuffer: e8d66ac50883e65cc6ee07738a36b09c58a6bf17 - React-nativeconfig: 59e6f9ddeb9d884de486d850a783b92cfebbe1b5 - React-NativeModulesApple: 0ab07d1155f6f522c6557532e89182d021717e7d - React-perflogger: 3c8953940b170732c1365c23aeef5fd50245d9fe - React-RCTActionSheet: cc6bb06be2f8340a670928999e510ccaf94ce04e - React-RCTAnimation: f554949ddc2f744d6230b6c69fe315bf3069d03c - React-RCTAppDelegate: ead50f626e0c96a83e6ff5b7271050928d05b038 - React-RCTBlob: 7512cd5a7b5dd7ce91c425ab9e0924f538fdd889 - React-RCTFabric: 5a4244ddb0f123364f5b91aa97debd5d8c923ada - React-RCTImage: b02e13c2aec1bec0f6af60deb25a88b47b7aa47b - React-RCTLinking: 10c7ba83b234bc5b720916d65cd64270785f0549 - React-RCTNetwork: 3cb96b886d75ee77b4d843b43ce9a3d7cea09d17 - React-RCTSettings: c34a61569d673efac2c59a588972ee87e115b816 - React-RCTText: 3e06e44603760ad09095a82e69104e656357d2e1 - React-RCTVibration: 0c54cee821ef71f232131fcd816e9acaf50fe688 - React-rendererdebug: 135e16aa4b100dfea3fb07de33ef0cc797764387 - React-rncore: f25b30f5ce9ed67c70f1f45ef6899593a667e81e - React-RuntimeApple: bc9be52ca49daba5e3fd2dba502cd47f822ac10a - React-RuntimeCore: 355325b7702c91644137ef63689c1b3464be7490 - React-runtimeexecutor: 097d0edcff4c463431ad6538ea2153583922ca86 - React-RuntimeHermes: 9b965a3662b54cc45eff6af747cbc97e1cbe945d - React-runtimescheduler: a80659eb4504ad696295b3e51b90805a97c34129 - React-utils: 2e199c0f64d49f8ca4175d878e365d2701ad41f7 - ReactCommon: 82a6500a0906815f2e6079d6a3f226bd2f58e61d - RNGestureHandler: 38016feaff9bd5d8282c78ddce37a89b3a1d595b + RCTRequired: 5e3631b27c08716986980ef23eed8abdee1cdcaf + RCTTypeSafety: 02a64828b0b428eb4f63de1397d44fb2d0747e85 + React: df5dbfbd10c5bd8d4bcb49bd9830551533e11c7e + React-callinvoker: dc0dff59e8d3d1fe4cd9fb5f120f82a775d2a325 + React-Codegen: 739edb7e5721eb4331a0507b8db2914b95b84bd8 + React-Core: 276ccbbf282538138f4429313bb1200a15067c6e + React-CoreModules: 64747180c0329bebed8307ffdc97c331220277a6 + React-cxxreact: 84d98283f701bae882dcd3ad7c573a02f4c9d5c0 + React-debug: 443cf46ade52f3555dd1ec709718793490ac5edc + React-Fabric: 4c877c032b3acc07ed3f2e46ae25b5a39af89382 + React-FabricImage: c46c47ea3c672b9fadd6850795a51d3d9e5df712 + React-graphics: e1cff03acf09098513642535324432d495b6425c + React-hermes: e3356f82c76c5c41688a7e08ced2254a944501c4 + React-ImageManager: c783771479ab0bf1e3dbe711cc8b9f5b0f65972b + React-jserrorhandler: 7cd93ce5165e5d66c87b6f612f94e5642f5c5028 + React-jsi: 81b5fe94500e69051c2f3a775308afaa53e2608b + React-jsiexecutor: 4f790f865ad23fa949396c1a103d06867c0047ed + React-jsinspector: 9f6fb9ed9f03a0fb961ab8dc2e0e0ee0dc729e77 + React-jsitracing: c4f0d56beda781bc3ce6e3594c9f7117f04b37a1 + React-logger: 008caec0d6a587abc1e71be21bfac5ba1662fe6a + React-Mapbuffer: 58fe558faf52ecde6705376700f848d0293d1cef + React-nativeconfig: a063483672b8add47a4875b0281e202908ff6747 + React-NativeModulesApple: 169506a5fd708ab22811f76ee06a976595c367a1 + React-perflogger: b61e5db8e5167f5e70366e820766c492847c082e + React-RCTActionSheet: dcaecff7ffc1888972cd1c1935751ff3bce1e0c1 + React-RCTAnimation: 24b8ae7ebc897ba3f33a93a020bbc66ab7863f5d + React-RCTAppDelegate: a6de16b274cb25098a5960cc5e21a5bb4ff07a8b + React-RCTBlob: 112880abc731c5a0d8eefb5919a591ad30f630e8 + React-RCTFabric: a0289e3bf73da8c03b68b4e9733ba497b021de45 + React-RCTImage: b8065c1b51cc6c2ff58ad81001619352518dd793 + React-RCTLinking: fdf9f43f8bd763d178281a079700105674953849 + React-RCTNetwork: ad3d988e425288492510ee37c9dcdf8259566214 + React-RCTSettings: 67c3876f2775d1cf86298f657e6006afc2a2e4cf + React-RCTText: 671518da40bd548943ec12ee6a60f733a751e2e9 + React-RCTVibration: 60bc4d01d7d8ab7cff14852a195a7fa93b38e1f3 + React-rendererdebug: 6aaab394c9fefe395ef61809580a9bf63b98fd3e + React-rncore: 89dce547cdf87ba254d9c45b91ca4bba481de383 + React-RuntimeApple: e16e0101da3586958bb6be48940f43211ae9eb0b + React-RuntimeCore: fce65e9a37b1e5b9b59ab2f72ce8cb82ddbaf69d + React-runtimeexecutor: 2ca6f02d3fd6eea5b9575eb30720cf12c5d89906 + React-RuntimeHermes: f730d6ac60dee9de505cdd25572f132d93d24fb0 + React-runtimescheduler: 77543c74df984ce56c09d49d427149c53784aaf6 + React-utils: 42708ea436853045ef1eaff29996813d9fbbe209 + ReactCommon: 851280fb976399ca1aabc74cc2c3612069ea70a2 + RNGestureHandler: 89a7087454ae0a90d8fa980491077167a00e5517 SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17 - Yoga: 580401abccf998bc081186108e981602f90e67b2 + Yoga: 44003f970aa541b79dfdd59cf236fda41bd5890f PODFILE CHECKSUM: 792f7d0ed591c328474645afc856de4fd1732c31 diff --git a/FabricExample/package.json b/FabricExample/package.json index d24b948b3a..f6c705fbfd 100644 --- a/FabricExample/package.json +++ b/FabricExample/package.json @@ -16,7 +16,7 @@ "patch-package": "^6.5.0", "postinstall-postinstall": "^2.1.0", "react": "18.2.0", - "react-native": "0.73.0-rc.5", + "react-native": "0.73.0", "react-native-gesture-handler": "link:../" }, "devDependencies": { diff --git a/FabricExample/yarn.lock b/FabricExample/yarn.lock index bb9cbd6078..43cd9a6adf 100644 --- a/FabricExample/yarn.lock +++ b/FabricExample/yarn.lock @@ -1873,43 +1873,50 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" -"@react-native-community/cli-clean@12.0.0": - version "12.0.0" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-clean/-/cli-clean-12.0.0.tgz#33f83709d566d1a59b317377eeb2a908b17509ae" - integrity sha512-wpR3317b18vQNAlAl8xa/+DA+3tX7gJj04dw6MWun2c6vk7o/iRCpk/FVbLpGx20k97ASW5fQ9reB2KJ+Wv7zg== +"@react-native-community/cli-clean@12.1.1": + version "12.1.1" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-clean/-/cli-clean-12.1.1.tgz#4f92b3d5eaa301c9db3fef2cbbaf68b87652f6f1" + integrity sha512-lbEQJ9xO8DmNbES7nFcGIQC0Q15e9q1zwKfkN2ty2eM93ZTFqYzOwsddlNoRN9FO7diakMWoWgielhcfcIeIrQ== dependencies: - "@react-native-community/cli-tools" "12.0.0" + "@react-native-community/cli-tools" "12.1.1" chalk "^4.1.2" execa "^5.0.0" -"@react-native-community/cli-config@12.0.0": - version "12.0.0" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-config/-/cli-config-12.0.0.tgz#ac6ae3cc409be52f3a40971331a5960a54d5977d" - integrity sha512-xGkqD7VtcAiDhI6pLXigJqGrd9voGPl+eQAhOvWWr1eZN7FfHM+jLhDI+JLDa6b3SNbFJBCXgiBunB6v90giWw== +"@react-native-community/cli-config@12.1.1": + version "12.1.1" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-config/-/cli-config-12.1.1.tgz#6fe932b6215f731b39eb54c800d1b068a2080666" + integrity sha512-og8/yH7ZNMBcRJOGaHcn9BLt1WJF3XvgBw8iYsByVSEN7yvzAbYZ+CvfN6EdObGOqendbnE4lN9CVyQYM9Ufsw== dependencies: - "@react-native-community/cli-tools" "12.0.0" + "@react-native-community/cli-tools" "12.1.1" chalk "^4.1.2" cosmiconfig "^5.1.0" deepmerge "^4.3.0" glob "^7.1.3" joi "^17.2.1" -"@react-native-community/cli-debugger-ui@12.0.0": - version "12.0.0" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-debugger-ui/-/cli-debugger-ui-12.0.0.tgz#949e48f1770414d5d3c08d14ddd5b5847b6034a4" - integrity sha512-gOid9bGi9dfGm+Ro89SFY9gZfrEk29MFn8wETgEGZ3K+/lelGzysfZmXyV0qk/N5nNurL3jOyhHRvLqU+XGOdQ== +"@react-native-community/cli-debugger-ui@12.1.1": + version "12.1.1" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-debugger-ui/-/cli-debugger-ui-12.1.1.tgz#b2e3854f8f77d2f60f845a0a9553123cedfa4669" + integrity sha512-q427jvbJ0WdDuS6HNdc3EbmUu/dX/+FWCcZI60xB7m1i/8p+LzmrsoR2yIJCricsAIV3hhiFOGfquZDgrbF27Q== dependencies: serve-static "^1.13.1" -"@react-native-community/cli-doctor@12.0.0": - version "12.0.0" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-doctor/-/cli-doctor-12.0.0.tgz#d5b2a5974911ec628b894180565c5363861c4326" - integrity sha512-dt38KoQiPCxs2E/RREwucpJHYXUcUIYbPZRvXm1qo71YvxfPSF4a3PM7u9nJw6Oba5F8lpinPpavgY4ykkoQLg== +"@react-native-community/cli-debugger-ui@12.3.0": + version "12.3.0" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-debugger-ui/-/cli-debugger-ui-12.3.0.tgz#75bbb2082a369b3559e0dffa8bfeebf2a9107e3e" + integrity sha512-w3b0iwjQlk47GhZWHaeTG8kKH09NCMUJO729xSdMBXE8rlbm4kHpKbxQY9qKb6NlfWSJN4noGY+FkNZS2rRwnQ== dependencies: - "@react-native-community/cli-config" "12.0.0" - "@react-native-community/cli-platform-android" "12.0.0" - "@react-native-community/cli-platform-ios" "12.0.0" - "@react-native-community/cli-tools" "12.0.0" + serve-static "^1.13.1" + +"@react-native-community/cli-doctor@12.1.1": + version "12.1.1" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-doctor/-/cli-doctor-12.1.1.tgz#e651a63c537ad7c9b8d9baa69e63947f5384a6bd" + integrity sha512-IUZJ/KUCuz+IzL9GdHUlIf6zF93XadxCBDPseUYb0ucIS+rEb3RmYC+IukYhUWwN3y4F/yxipYy3ytKrQ33AxA== + dependencies: + "@react-native-community/cli-config" "12.1.1" + "@react-native-community/cli-platform-android" "12.1.1" + "@react-native-community/cli-platform-ios" "12.1.1" + "@react-native-community/cli-tools" "12.1.1" chalk "^4.1.2" command-exists "^1.2.8" deepmerge "^4.3.0" @@ -1924,53 +1931,68 @@ wcwidth "^1.0.1" yaml "^2.2.1" -"@react-native-community/cli-hermes@12.0.0": - version "12.0.0" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-hermes/-/cli-hermes-12.0.0.tgz#b6d04d93e51b68c614a1ff9377694255a5e1294b" - integrity sha512-7W9bp0II83t9FvZ0UC+UwagBr1ySFWfb8gPfZwdpSRSAzTkrJjpLYjfFKs2uhLV63dzM8jyyE/voiQIWi2hnfA== +"@react-native-community/cli-hermes@12.1.1": + version "12.1.1" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-hermes/-/cli-hermes-12.1.1.tgz#9b48c91acb4db88aab648e92d4d1fe19cd0a6191" + integrity sha512-J6yxQoZooFRT8+Dtz8Px/bwasQxnbxZZFAFQzOs3f6CAfXrcr/+JLVFZRWRv9XGfcuLdCHr22JUVPAnyEd48DA== dependencies: - "@react-native-community/cli-platform-android" "12.0.0" - "@react-native-community/cli-tools" "12.0.0" + "@react-native-community/cli-platform-android" "12.1.1" + "@react-native-community/cli-tools" "12.1.1" chalk "^4.1.2" hermes-profile-transformer "^0.0.6" ip "^1.1.5" -"@react-native-community/cli-platform-android@12.0.0": - version "12.0.0" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-android/-/cli-platform-android-12.0.0.tgz#55450b94511cea0ea945661c6d4c83ea6770db78" - integrity sha512-QjQUh5it4TUwKZIn+T3xhU/IvrUrx1el535Ia6y940tyTxnZ5zQPZnd2JxRcOLiHtKSQL72VnD3yBMRjYtp1HA== +"@react-native-community/cli-platform-android@12.1.1": + version "12.1.1" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-android/-/cli-platform-android-12.1.1.tgz#f6541ee07ee479ee0e1b082cbf4ff970737606e4" + integrity sha512-jnyc9y5cPltBo518pfVZ53dtKGDy02kkCkSIwv4ltaHYse7JyEFxFbzBn9lloWvbZ0iFHvEo1NN78YGPAlXSDw== dependencies: - "@react-native-community/cli-tools" "12.0.0" + "@react-native-community/cli-tools" "12.1.1" chalk "^4.1.2" execa "^5.0.0" fast-xml-parser "^4.2.4" glob "^7.1.3" logkitty "^0.7.1" -"@react-native-community/cli-platform-ios@12.0.0": - version "12.0.0" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-ios/-/cli-platform-ios-12.0.0.tgz#9489f72ccaf915d4c8a3e1f6edd21908ec1f8d38" - integrity sha512-4c4xH59CpebgZb6dV/uw3lO3gZOSNY2GL9VjYFTXAMQSAnibnWjd1UFwP89TJNTyr/joYIU+vLDZ6nehZ78WoQ== +"@react-native-community/cli-platform-ios@12.1.1": + version "12.1.1" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-ios/-/cli-platform-ios-12.1.1.tgz#399fc39279b8bd95f372c0f69180696b6f9767e1" + integrity sha512-RA2lvFrswwQRIhCV3hoIYZmLe9TkRegpAWimdubtMxRHiv7Eh2dC0VWWR5VdWy3ltbJzeiEpxCoH/EcrMfp9tg== dependencies: - "@react-native-community/cli-tools" "12.0.0" + "@react-native-community/cli-tools" "12.1.1" chalk "^4.1.2" execa "^5.0.0" fast-xml-parser "^4.0.12" glob "^7.1.3" ora "^5.4.1" -"@react-native-community/cli-plugin-metro@12.0.0": - version "12.0.0" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-plugin-metro/-/cli-plugin-metro-12.0.0.tgz#0203677ced7f3f591b1839468c6d5f6fa3f40871" - integrity sha512-4fQOg2mBHhGWsSHw5btyI1Qbe8owZ5Ul2Soyysl5XT3aLVuXn+EBurVuH8Zyvbl1T4k09dgj03ojnlPA8PlIOg== +"@react-native-community/cli-plugin-metro@12.1.1": + version "12.1.1" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-plugin-metro/-/cli-plugin-metro-12.1.1.tgz#446f829aa37caee7440d863a42d0f600a4713d8b" + integrity sha512-HV+lW1mFSu6GL7du+0/tfq8/5jytKp+w3n4+MWzRkx5wXvUq3oJjzwe8y+ZvvCqkRPdsOiwFDgJrtPhvaZp+xA== + +"@react-native-community/cli-server-api@12.1.1": + version "12.1.1" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-server-api/-/cli-server-api-12.1.1.tgz#c00319cba3cdd1ba2cf82286cfa4aa3a6bc6a5b2" + integrity sha512-dUqqEmtEiCMyqFd6LF1UqH0WwXirK2tpU7YhyFsBbigBj3hPz2NmzghCe7DRIcC9iouU0guBxhgmiLtmUEPduQ== + dependencies: + "@react-native-community/cli-debugger-ui" "12.1.1" + "@react-native-community/cli-tools" "12.1.1" + compression "^1.7.1" + connect "^3.6.5" + errorhandler "^1.5.1" + nocache "^3.0.1" + pretty-format "^26.6.2" + serve-static "^1.13.1" + ws "^7.5.1" -"@react-native-community/cli-server-api@12.0.0": - version "12.0.0" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-server-api/-/cli-server-api-12.0.0.tgz#50961549f715a2a9b3d605e8d21a52bb067de88a" - integrity sha512-ovHCG71oAsxl3/RNuxBFgqPNZT3aK2eM4o39VetmxQd/KsjKT7mXU02QdwLX53H31wA0Aex/xKwqOGAUBGLHfQ== +"@react-native-community/cli-server-api@12.3.0": + version "12.3.0" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-server-api/-/cli-server-api-12.3.0.tgz#0460472d44c121d1db8a98ad1df811200c074fb3" + integrity sha512-Rode8NrdyByC+lBKHHn+/W8Zu0c+DajJvLmOWbe2WY/ECvnwcd9MHHbu92hlT2EQaJ9LbLhGrSbQE3cQy9EOCw== dependencies: - "@react-native-community/cli-debugger-ui" "12.0.0" - "@react-native-community/cli-tools" "12.0.0" + "@react-native-community/cli-debugger-ui" "12.3.0" + "@react-native-community/cli-tools" "12.3.0" compression "^1.7.1" connect "^3.6.5" errorhandler "^1.5.1" @@ -1979,10 +2001,10 @@ serve-static "^1.13.1" ws "^7.5.1" -"@react-native-community/cli-tools@12.0.0": - version "12.0.0" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-tools/-/cli-tools-12.0.0.tgz#2ff8bff8d6bb0f1162c574fdcf47aa273a48b7ad" - integrity sha512-p5QN3UMoAKUTpVblKAf+tW3I+nX6wyPgaXYZ+K3H0vZNmbVim+eODFi32NH1XnvuvblVpakovmMrhnBpRnSAgg== +"@react-native-community/cli-tools@12.1.1": + version "12.1.1" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-tools/-/cli-tools-12.1.1.tgz#c70df5da2d3ad61e5e8ab70dd36d84a89c322b23" + integrity sha512-c9vjDVojZnivGsLoVoTZsJjHnwBEI785yV8mgyKTVFx1sciK8lCsIj1Lke7jNpz7UAE1jW94nI7de2B1aQ9rbA== dependencies: appdirsjs "^1.2.4" chalk "^4.1.2" @@ -1995,27 +2017,43 @@ shell-quote "^1.7.3" sudo-prompt "^9.0.0" -"@react-native-community/cli-types@12.0.0": - version "12.0.0" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-types/-/cli-types-12.0.0.tgz#333bcd4803343d5278e6fb436c21524b073cd1e8" - integrity sha512-1HhPlVqP99qRx1cd4PzQHAdaAW6cSv6LsOz/r+BGTEzl1wZ507vplVDGWDNRX0Zu7nGYiMIGeFBJwz2wINKhiQ== +"@react-native-community/cli-tools@12.3.0": + version "12.3.0" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-tools/-/cli-tools-12.3.0.tgz#d459a116e1a95034d3c9a6385069c9e2049fb2a6" + integrity sha512-2GafnCr8D88VdClwnm9KZfkEb+lzVoFdr/7ybqhdeYM0Vnt/tr2N+fM1EQzwI1DpzXiBzTYemw8GjRq+Utcz2Q== + dependencies: + appdirsjs "^1.2.4" + chalk "^4.1.2" + find-up "^5.0.0" + mime "^2.4.1" + node-fetch "^2.6.0" + open "^6.2.0" + ora "^5.4.1" + semver "^7.5.2" + shell-quote "^1.7.3" + sudo-prompt "^9.0.0" + +"@react-native-community/cli-types@12.1.1": + version "12.1.1" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-types/-/cli-types-12.1.1.tgz#5a5c0593f50dc394af5265364d0e919ba6134653" + integrity sha512-B9lFEIc1/H2GjiyRCk6ISJNn06h5j0cWuokNm3FmeyGOoGIfm4XYUbnM6IpGlIDdQpTtUzZfNq8CL4CIJZXF0g== dependencies: joi "^17.2.1" -"@react-native-community/cli@12.0.0": - version "12.0.0" - resolved "https://registry.yarnpkg.com/@react-native-community/cli/-/cli-12.0.0.tgz#8678e937497760788bcc0bde5a4e42be6fa38462" - integrity sha512-sSw0mPFuS24wHEulNq6hObkRzJbEhzWGb6SWwC59q0xnYztFfjg0M+f0B8EscW8OZ3Ky7vGFqF3IxFR62aP61Q== - dependencies: - "@react-native-community/cli-clean" "12.0.0" - "@react-native-community/cli-config" "12.0.0" - "@react-native-community/cli-debugger-ui" "12.0.0" - "@react-native-community/cli-doctor" "12.0.0" - "@react-native-community/cli-hermes" "12.0.0" - "@react-native-community/cli-plugin-metro" "12.0.0" - "@react-native-community/cli-server-api" "12.0.0" - "@react-native-community/cli-tools" "12.0.0" - "@react-native-community/cli-types" "12.0.0" +"@react-native-community/cli@12.1.1": + version "12.1.1" + resolved "https://registry.yarnpkg.com/@react-native-community/cli/-/cli-12.1.1.tgz#55e413ee620bea1e6b58c92dad2e9f196d3a5af2" + integrity sha512-St/lyxQ//crrigfE2QCqmjDb0IH3S9nmolm0eqmCA1bB8WWUk5dpjTgQk6xxDxz+3YtMghDJkGZPK4AxDXT42g== + dependencies: + "@react-native-community/cli-clean" "12.1.1" + "@react-native-community/cli-config" "12.1.1" + "@react-native-community/cli-debugger-ui" "12.1.1" + "@react-native-community/cli-doctor" "12.1.1" + "@react-native-community/cli-hermes" "12.1.1" + "@react-native-community/cli-plugin-metro" "12.1.1" + "@react-native-community/cli-server-api" "12.1.1" + "@react-native-community/cli-tools" "12.1.1" + "@react-native-community/cli-types" "12.1.1" chalk "^4.1.2" commander "^9.4.1" deepmerge "^4.3.0" @@ -2144,24 +2182,27 @@ jscodeshift "^0.14.0" nullthrows "^1.1.1" -"@react-native/codegen@^0.73.1": - version "0.73.1" - resolved "https://registry.yarnpkg.com/@react-native/codegen/-/codegen-0.73.1.tgz#b081a8b8e4d766e7313fdaaaa7c3f79145dac448" - integrity sha512-umgmDWOlfo8y7Ol1dssi5Ade5kR0vGFg4z3A4lC2c1WO7ZU/O446FPLBud+7MV9frqmk64ddnbzrR+U9GN+HoQ== +"@react-native/codegen@^0.73.2": + version "0.73.2" + resolved "https://registry.yarnpkg.com/@react-native/codegen/-/codegen-0.73.2.tgz#58af4e4c3098f0e6338e88ec64412c014dd51519" + integrity sha512-lfy8S7umhE3QLQG5ViC4wg5N1Z+E6RnaeIw8w1voroQsXXGPB72IBozh8dAHR3+ceTxIU0KX3A8OpJI8e1+HpQ== dependencies: "@babel/parser" "^7.20.0" flow-parser "^0.206.0" + glob "^7.1.1" + invariant "^2.2.4" jscodeshift "^0.14.0" + mkdirp "^0.5.1" nullthrows "^1.1.1" -"@react-native/community-cli-plugin@^0.73.9": - version "0.73.9" - resolved "https://registry.yarnpkg.com/@react-native/community-cli-plugin/-/community-cli-plugin-0.73.9.tgz#97c2cefb3062787cb55710ef59729521174bda15" - integrity sha512-0nM3i3GLpvfUlzzoU+Mncu4IXT7Y33nm1rdoN0mLf4VOzxgboTnoqbfe7gh5X3OhRclaskEgYEQRopo6eCjFdA== +"@react-native/community-cli-plugin@^0.73.10": + version "0.73.11" + resolved "https://registry.yarnpkg.com/@react-native/community-cli-plugin/-/community-cli-plugin-0.73.11.tgz#8826cb81bb794408202e1ce7d87e45710eff1a9f" + integrity sha512-s0bprwljKS1Al8wOKathDDmRyF+70CcNE2G/aqZ7+L0NoOE0Uxxx/5P2BxlM2Mfht7O33B4SeMNiPdE/FqIubQ== dependencies: - "@react-native-community/cli-server-api" "12.0.0" - "@react-native-community/cli-tools" "12.0.0" - "@react-native/dev-middleware" "^0.73.5" + "@react-native-community/cli-server-api" "12.3.0" + "@react-native-community/cli-tools" "12.3.0" + "@react-native/dev-middleware" "^0.73.6" "@react-native/metro-babel-transformer" "^0.73.12" chalk "^4.0.0" execa "^5.1.1" @@ -2171,18 +2212,18 @@ node-fetch "^2.2.0" readline "^1.3.0" -"@react-native/debugger-frontend@^0.73.2": - version "0.73.2" - resolved "https://registry.yarnpkg.com/@react-native/debugger-frontend/-/debugger-frontend-0.73.2.tgz#4ad2748aa72e1aac640c0e916ff43c37f357f907" - integrity sha512-YDCerm7FwaWMsc4zVBWQ3jMuFoq+a3DGhS4LAynwsFqCyo8Gmir2ARvmOHQdqZZ2KrBWqaIyiHh1nJ/UrAJntw== +"@react-native/debugger-frontend@^0.73.3": + version "0.73.3" + resolved "https://registry.yarnpkg.com/@react-native/debugger-frontend/-/debugger-frontend-0.73.3.tgz#033757614d2ada994c68a1deae78c1dd2ad33c2b" + integrity sha512-RgEKnWuoo54dh7gQhV7kvzKhXZEhpF9LlMdZolyhGxHsBqZ2gXdibfDlfcARFFifPIiaZ3lXuOVVa4ei+uPgTw== -"@react-native/dev-middleware@^0.73.5": - version "0.73.5" - resolved "https://registry.yarnpkg.com/@react-native/dev-middleware/-/dev-middleware-0.73.5.tgz#b629c8d281889e4759dcdcf1b1785019cbdfdd75" - integrity sha512-Ca9RHPaQXQn9yZke4n8sG09u+RuWpQun4imKg3tuykwPH3UrTTSSxoP/I04xdxsAOxaCkCl/ZdgL6SiAmzxWiQ== +"@react-native/dev-middleware@^0.73.6": + version "0.73.6" + resolved "https://registry.yarnpkg.com/@react-native/dev-middleware/-/dev-middleware-0.73.6.tgz#19ee210fddc3abb8eeb3da5f98711719ad032323" + integrity sha512-9SD7gIso+hO1Jy1Y/Glbd+JWQwyH7Xjnwebtkxdm5TMB51LQPjaGtMcwEigbIZyAtvoaDGmhWmudwbKpDlS+gA== dependencies: "@isaacs/ttlcache" "^1.4.1" - "@react-native/debugger-frontend" "^0.73.2" + "@react-native/debugger-frontend" "^0.73.3" chrome-launcher "^0.15.2" chromium-edge-launcher "^1.0.0" connect "^3.6.5" @@ -2216,10 +2257,10 @@ resolved "https://registry.yarnpkg.com/@react-native/eslint-plugin/-/eslint-plugin-0.73.1.tgz#79d2c4d90c80bfad8900db335bfbaf1ca599abdc" integrity sha512-8BNMFE8CAI7JLWLOs3u33wcwcJ821LYs5g53Xyx9GhSg0h8AygTwDrwmYb/pp04FkCNCPjKPBoaYRthQZmxgwA== -"@react-native/gradle-plugin@^0.73.3": - version "0.73.3" - resolved "https://registry.yarnpkg.com/@react-native/gradle-plugin/-/gradle-plugin-0.73.3.tgz#94851d0ee12a4ada9a10b7731698c5f67a5b8063" - integrity sha512-0dbzN0RTCCTJetRCIMRHNqomfri0tBrNVgJHqRg/cxfSP/ePkzPnp5nhwLr+bCDRd4z8zDsQ+/+87P/77RRsZQ== +"@react-native/gradle-plugin@^0.73.4": + version "0.73.4" + resolved "https://registry.yarnpkg.com/@react-native/gradle-plugin/-/gradle-plugin-0.73.4.tgz#aa55784a8c2b471aa89934db38c090d331baf23b" + integrity sha512-PMDnbsZa+tD55Ug+W8CfqXiGoGneSSyrBZCMb5JfiB3AFST3Uj5e6lw8SgI/B6SKZF7lG0BhZ6YHZsRZ5MlXmg== "@react-native/js-polyfills@^0.73.1": version "0.73.1" @@ -4058,7 +4099,7 @@ glob-parent@^6.0.2: dependencies: is-glob "^4.0.3" -glob@^7.1.3, glob@^7.1.4: +glob@^7.1.1, glob@^7.1.3, glob@^7.1.4: version "7.2.3" resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== @@ -6333,19 +6374,19 @@ react-is@^17.0.1: version "0.0.0" uid "" -react-native@0.73.0-rc.5: - version "0.73.0-rc.5" - resolved "https://registry.yarnpkg.com/react-native/-/react-native-0.73.0-rc.5.tgz#a5d6621c6b264e5cdd3390f31faed46cd7c826d4" - integrity sha512-1XaNDjkviU3gnMhiWvk9CKfOIqNxQfroBB3/gtsAd4b1iwbMTeNu3lO81EMpUQPIgNB4Lf/7W8ePFl2WsiWUHw== +react-native@0.73.0: + version "0.73.0" + resolved "https://registry.yarnpkg.com/react-native/-/react-native-0.73.0.tgz#553bce5ed4bd3d9f71014127bd687133562c5049" + integrity sha512-ya7wu/L8BeATv2rtXZDToYyD9XuTTDCByi8LvJGr6GKSXcmokkCRMGAiTEZfPkq7+nhVmbasjtoAJDuMRYfudQ== dependencies: "@jest/create-cache-key-function" "^29.6.3" - "@react-native-community/cli" "12.0.0" - "@react-native-community/cli-platform-android" "12.0.0" - "@react-native-community/cli-platform-ios" "12.0.0" + "@react-native-community/cli" "12.1.1" + "@react-native-community/cli-platform-android" "12.1.1" + "@react-native-community/cli-platform-ios" "12.1.1" "@react-native/assets-registry" "^0.73.1" - "@react-native/codegen" "^0.73.1" - "@react-native/community-cli-plugin" "^0.73.9" - "@react-native/gradle-plugin" "^0.73.3" + "@react-native/codegen" "^0.73.2" + "@react-native/community-cli-plugin" "^0.73.10" + "@react-native/gradle-plugin" "^0.73.4" "@react-native/js-polyfills" "^0.73.1" "@react-native/normalize-colors" "^0.73.2" "@react-native/virtualized-lists" "^0.73.3" diff --git a/RNGestureHandler.podspec b/RNGestureHandler.podspec index 8d4a06c621..6ee238b09c 100644 --- a/RNGestureHandler.podspec +++ b/RNGestureHandler.podspec @@ -14,7 +14,7 @@ Pod::Spec.new do |s| s.license = "MIT" s.author = { package["author"]["name"] => package["author"]["email"] } s.source = { :git => "https://github.com/software-mansion/react-native-gesture-handler", :tag => "#{s.version}" } - s.source_files = "apple/**/*.{h,m,mm}" + s.source_files = ["apple/**/*.{h,m,mm}", "common/cpp/**/*.{mm,h}"] s.requires_arc = true s.platforms = { ios: apple_platform, tvos: apple_platform, osx: '10.15' } diff --git a/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerRootHelper.kt b/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerRootHelper.kt index f6ea6a107f..e047cec9f9 100644 --- a/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerRootHelper.kt +++ b/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerRootHelper.kt @@ -10,8 +10,10 @@ import com.facebook.react.bridge.ReactContext import com.facebook.react.bridge.UiThreadUtil import com.facebook.react.common.ReactConstants import com.facebook.react.uimanager.RootView +import com.facebook.react.uimanager.ThemedReactContext import com.swmansion.gesturehandler.core.GestureHandler import com.swmansion.gesturehandler.core.GestureHandlerOrchestrator +import java.lang.Exception class RNGestureHandlerRootHelper(private val context: ReactContext, wrappedView: ViewGroup) { private val orchestrator: GestureHandlerOrchestrator? @@ -24,7 +26,12 @@ class RNGestureHandlerRootHelper(private val context: ReactContext, wrappedView: UiThreadUtil.assertOnUiThread() val wrappedViewTag = wrappedView.id check(wrappedViewTag >= 1) { "Expect view tag to be set for $wrappedView" } - val module = context.getNativeModule(RNGestureHandlerModule::class.java)!! + + val module = try { + context.getNativeModule(RNGestureHandlerModule::class.java)!! + } catch (e: Exception) { + (context as ThemedReactContext).reactApplicationContext.getNativeModule(RNGestureHandlerModule::class.java)!! + } val registry = module.registry rootView = findRootViewTag(wrappedView) Log.i( @@ -49,7 +56,11 @@ class RNGestureHandlerRootHelper(private val context: ReactContext, wrappedView: ReactConstants.TAG, "[GESTURE HANDLER] Tearing down gesture handler registered for root view $rootView" ) - val module = context.getNativeModule(RNGestureHandlerModule::class.java)!! + val module = try { + context.getNativeModule(RNGestureHandlerModule::class.java)!! + } catch (e: Exception) { + (context as ThemedReactContext).reactApplicationContext.getNativeModule(RNGestureHandlerModule::class.java)!! + } with(module) { registry.dropHandler(jsGestureHandler!!.tag) unregisterRootHelper(this@RNGestureHandlerRootHelper) diff --git a/apple/RNGestureHandlerModule.h b/apple/RNGestureHandlerModule.h index 4e0cf29f58..9e0e56d8f6 100644 --- a/apple/RNGestureHandlerModule.h +++ b/apple/RNGestureHandlerModule.h @@ -2,6 +2,17 @@ #import #import +#ifdef RCT_NEW_ARCH_ENABLED +// TODO: needed to be able to use namespace, but can be done better for sure +#import +using namespace facebook; +using namespace react; +#endif // RCT_NEW_ARCH_ENABLED + @interface RNGestureHandlerModule : RCTEventEmitter +#ifdef RCT_NEW_ARCH_ENABLED ++ (void)installWithRuntime:(jsi::Runtime *)runtime; +#endif // RCT_NEW_ARCH_ENABLED + @end diff --git a/apple/RNGestureHandlerModule.mm b/apple/RNGestureHandlerModule.mm index c530aa9d3a..bf4f89f0d7 100644 --- a/apple/RNGestureHandlerModule.mm +++ b/apple/RNGestureHandlerModule.mm @@ -13,7 +13,6 @@ #import #import #import -#import #import #endif // RCT_NEW_ARCH_ENABLED @@ -125,8 +124,16 @@ - (void)setBridge:(RCTBridge *)bridge { RCTCxxBridge *cxxBridge = (RCTCxxBridge *)self.bridge; auto runtime = (jsi::Runtime *)cxxBridge.runtime; + if (runtime) { + decorateRuntime(*runtime); + return @true; + } + return @false; +} + ++ (void)installWithRuntime:(jsi::Runtime *)runtime +{ decorateRuntime(*runtime); - return @true; } #endif // RCT_NEW_ARCH_ENABLED diff --git a/common/cpp/CMakeLists.txt b/common/cpp/CMakeLists.txt new file mode 100644 index 0000000000..e955cdf089 --- /dev/null +++ b/common/cpp/CMakeLists.txt @@ -0,0 +1,32 @@ +cmake_minimum_required(VERSION 3.13) +set(CMAKE_VERBOSE_MAKEFILE on) +set(PACKAGE_NAME "gesturehandler") + +add_compile_options( + -fexceptions + -frtti + -std=c++20) + +file(GLOB tm_SRC CONFIGURE_DEPENDS *.cpp) +add_library(tm STATIC ${tm_SRC}) + +target_include_directories(tm PUBLIC .) +target_include_directories(react_codegen_rngesturehandler_codegen PUBLIC .) + +target_include_directories( + tm + PRIVATE + "${REACT_NATIVE_DIR}/ReactCommon" +) + +find_package(ReactAndroid REQUIRED CONFIG) + +target_link_libraries( + tm + ReactAndroid::react_render_core + ReactAndroid::react_render_uimanager + ReactAndroid::react_render_graphics + ReactAndroid::jsi + ReactAndroid::react_nativemodule_core + react_codegen_rngesturehandler_codegen + ) diff --git a/common/cpp/RNGHTurboCppModule.cpp b/common/cpp/RNGHTurboCppModule.cpp new file mode 100644 index 0000000000..dcc7e026c3 --- /dev/null +++ b/common/cpp/RNGHTurboCppModule.cpp @@ -0,0 +1,37 @@ +#include "RNGHTurboCppModule.h" +#include +#include + +namespace facebook::react { + +RNGHTurboCppModule::RNGHTurboCppModule(std::shared_ptr jsInvoker) + : NativeRNGHTurboCppModuleCxxSpec(std::move(jsInvoker)) {} + +bool RNGHTurboCppModule::installBridgeless(jsi::Runtime& runtime) { + auto isFormsStackingContext = jsi::Function::createFromHostFunction( + runtime, + jsi::PropNameID::forAscii(runtime, "isFormsStackingContext"), + 1, + [](jsi::Runtime &runtime, + const jsi::Value &thisValue, + const jsi::Value *arguments, + size_t count) -> jsi::Value { + if (!arguments[0].isObject()) { + return jsi::Value::null(); + } + + auto shadowNode = arguments[0] + .asObject(runtime) + .getHostObject(runtime) + ->shadowNode; + bool isFormsStackingContext = shadowNode->getTraits().check( + ShadowNodeTraits::FormsStackingContext); + + return jsi::Value(isFormsStackingContext); + }); + runtime.global().setProperty( + runtime, "isFormsStackingContext", std::move(isFormsStackingContext)); + return true; +} + +} // namespace facebook::react diff --git a/common/cpp/RNGHTurboCppModule.h b/common/cpp/RNGHTurboCppModule.h new file mode 100644 index 0000000000..1d85c3d793 --- /dev/null +++ b/common/cpp/RNGHTurboCppModule.h @@ -0,0 +1,20 @@ +#pragma once + +#if __has_include() // CocoaPod headers on Apple +#include +#elif __has_include("rngesturehandler_codegenJSI.h") // CMake headers on Android +#include "rngesturehandler_codegenJSI.h" +#endif +#include +#include + +namespace facebook::react { + +class RNGHTurboCppModule : public NativeRNGHTurboCppModuleCxxSpec { + public: + RNGHTurboCppModule(std::shared_ptr jsInvoker); + + bool installBridgeless(jsi::Runtime& rt); +}; + +} // namespace facebook::react diff --git a/common/cpp/RNGHTurboCppModule.mm b/common/cpp/RNGHTurboCppModule.mm new file mode 100644 index 0000000000..102715058f --- /dev/null +++ b/common/cpp/RNGHTurboCppModule.mm @@ -0,0 +1,15 @@ +#include "RNGHTurboCppModule.h" + +#include + +namespace facebook::react { + +RNGHTurboCppModule::RNGHTurboCppModule(std::shared_ptr jsInvoker) + : NativeRNGHTurboCppModuleCxxSpec(std::move(jsInvoker)) {} + +bool RNGHTurboCppModule::installBridgeless(jsi::Runtime& rt) { + [RNGestureHandlerModule installWithRuntime:&rt]; + return YES; +} + +} // namespace facebook::react diff --git a/package.json b/package.json index 70c9897a42..25bba5cf89 100644 --- a/package.json +++ b/package.json @@ -146,7 +146,7 @@ ], "codegenConfig": { "name": "rngesturehandler_codegen", - "type": "components", + "type": "all", "jsSrcsDir": "./src/specs" } } diff --git a/src/RNGestureHandlerModule.ts b/src/RNGestureHandlerModule.ts index f777d1eeb7..274474851b 100644 --- a/src/RNGestureHandlerModule.ts +++ b/src/RNGestureHandlerModule.ts @@ -43,7 +43,7 @@ export type RNGestureHandlerModuleProps = { newConfig: Readonly> ) => void; dropGestureHandler: (handlerTag: number) => void; - install: () => void; + install: () => boolean; flushOperations: () => void; }; diff --git a/src/handlers/createHandler.tsx b/src/handlers/createHandler.tsx index 7f991fed1c..3b4f7bf961 100644 --- a/src/handlers/createHandler.tsx +++ b/src/handlers/createHandler.tsx @@ -5,6 +5,7 @@ import { DeviceEventEmitter, EmitterSubscription, } from 'react-native'; +import { customDirectEventTypes } from 'react-native/Libraries/Renderer/shims/ReactNativeViewConfigRegistry'; // @ts-ignore - it isn't typed by TS & don't have definitelyTyped types import deepEqual from 'lodash/isEqual'; import RNGestureHandlerModule from '../RNGestureHandlerModule'; @@ -33,6 +34,10 @@ import { ghQueueMicrotask } from '../ghQueueMicrotask'; const UIManagerAny = UIManager as any; +customDirectEventTypes.topOnGestureHandlerEvent = { + registrationName: 'onGestureHandlerEvent', +}; + const customGHEventsConfigFabricAndroid = { topOnGestureHandlerEvent: { registrationName: 'onGestureHandlerEvent' }, topOnGestureHandlerStateChange: { diff --git a/src/init.ts b/src/init.ts index 3f753cd72f..c0da4c4811 100644 --- a/src/init.ts +++ b/src/init.ts @@ -1,6 +1,7 @@ import { startListening } from './handlers/gestures/eventReceiver'; import RNGestureHandlerModule from './RNGestureHandlerModule'; import { isFabric } from './utils'; +import RNGHTurboCppModule from './specs/NativeRNGHTurboCppModule'; let fabricInitialized = false; @@ -12,7 +13,9 @@ export function initialize() { // method during render of GestureHandlerRootView export function maybeInitializeFabric() { if (isFabric() && !fabricInitialized) { - RNGestureHandlerModule.install(); - fabricInitialized = true; + fabricInitialized = RNGestureHandlerModule.install(); + if (!fabricInitialized) { + fabricInitialized = RNGHTurboCppModule?.installBridgeless() || false; + } } } diff --git a/src/specs/NativeRNGHTurboCppModule.ts b/src/specs/NativeRNGHTurboCppModule.ts new file mode 100644 index 0000000000..bc634dfd23 --- /dev/null +++ b/src/specs/NativeRNGHTurboCppModule.ts @@ -0,0 +1,7 @@ +import { TurboModule, TurboModuleRegistry } from 'react-native'; + +export interface Spec extends TurboModule { + readonly installBridgeless: () => boolean; +} + +export default TurboModuleRegistry.get('RNGHTurboCppModule'); From 6fac65875e92737f878d25a9f988dac7b92098c0 Mon Sep 17 00:00:00 2001 From: Wojciech Lewicki Date: Tue, 9 Jan 2024 16:27:57 +0100 Subject: [PATCH 2/6] feat: make cpp turbomodule work on Android without any user code --- FabricExample/android/app/build.gradle | 40 --------- .../android/app/src/main/jni/CMakeLists.txt | 34 ------- .../android/app/src/main/jni/OnLoad.cpp | 90 ------------------- .../react/RNGestureHandlerModule.kt | 5 +- android/src/main/jni/CMakeLists.txt | 13 ++- android/src/main/jni/cpp-adapter.cpp | 68 +++++++------- common/cpp/CMakeLists.txt | 32 ------- common/cpp/RNGHTurboCppModule.cpp | 51 ++++++----- common/cpp/RNGHTurboCppModule.h | 4 + 9 files changed, 80 insertions(+), 257 deletions(-) delete mode 100644 FabricExample/android/app/src/main/jni/CMakeLists.txt delete mode 100644 FabricExample/android/app/src/main/jni/OnLoad.cpp delete mode 100644 common/cpp/CMakeLists.txt diff --git a/FabricExample/android/app/build.gradle b/FabricExample/android/app/build.gradle index f3287efe80..6290d62c9e 100644 --- a/FabricExample/android/app/build.gradle +++ b/FabricExample/android/app/build.gradle @@ -83,33 +83,6 @@ def safeExtGet(prop, fallback) { rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback } -def resolveReactNativeDirectory() { - def reactNativeLocation = safeExtGet("REACT_NATIVE_NODE_MODULES_DIR", null) - if (reactNativeLocation != null) { - return file(reactNativeLocation) - } - - // monorepo workaround - // react-native can be hoisted or in project's own node_modules - def reactNativeFromProjectNodeModules = file("${rootProject.projectDir}/../node_modules/react-native") - if (reactNativeFromProjectNodeModules.exists()) { - return reactNativeFromProjectNodeModules - } - - def reactNativeFromNodeModulesWithReanimated = file("${projectDir}/../../react-native") - if (reactNativeFromNodeModulesWithReanimated.exists()) { - return reactNativeFromNodeModulesWithReanimated - } - - throw new Exception( - "[react-native-gesture-handler] Unable to resolve react-native location in " + - "node_modules. You should add project extension property (in app/build.gradle) " + - "`REACT_NATIVE_NODE_MODULES_DIR` with path to react-native." - ) -} - -def REACT_NATIVE_DIR = resolveReactNativeDirectory() - /** * Private function to get the list of Native Architectures you want to build. * This reads the value from reactNativeArchitectures in your gradle.properties @@ -133,21 +106,8 @@ android { targetSdkVersion rootProject.ext.targetSdkVersion versionCode 1 versionName "1.0" - - externalNativeBuild { - cmake { - arguments "-DREACT_NATIVE_DIR=${REACT_NATIVE_DIR}", - "-DANDROID_STL=c++_shared" - } - } } - externalNativeBuild { - cmake { - path "src/main/jni/CMakeLists.txt" - } - } - splits { abi { reset() diff --git a/FabricExample/android/app/src/main/jni/CMakeLists.txt b/FabricExample/android/app/src/main/jni/CMakeLists.txt deleted file mode 100644 index 70eafee84e..0000000000 --- a/FabricExample/android/app/src/main/jni/CMakeLists.txt +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under the MIT license found in the -# LICENSE file in the root directory of this source tree. - -# This CMake file is the default used by apps and is placed inside react-native -# to encapsulate it from user space (so you won't need to touch C++/Cmake code at all on Android). -# -# If you wish to customize it (because you want to manually link a C++ library or pass a custom -# compilation flag) you can: -# -# 1. Copy this CMake file inside the `android/app/src/main/jni` folder of your project -# 2. Copy the OnLoad.cpp (in this same folder) file inside the same folder as above. -# 3. Extend your `android/app/build.gradle` as follows -# -# android { -# // Other config here... -# externalNativeBuild { -# cmake { -# path "src/main/jni/CMakeLists.txt" -# } -# } -# } - -cmake_minimum_required(VERSION 3.13) - -# Define the library name here. -project(appmodules) - -# This file includes all the necessary to let you build your application with the New Architecture. -include(${REACT_ANDROID_DIR}/cmake-utils/ReactNative-application.cmake) -# App needs to add and link against tm (TurboModules) folder -add_subdirectory(${REACT_ANDROID_DIR}/../../../node_modules/react-native-gesture-handler/common/cpp tm_build) -target_link_libraries(${CMAKE_PROJECT_NAME} tm) \ No newline at end of file diff --git a/FabricExample/android/app/src/main/jni/OnLoad.cpp b/FabricExample/android/app/src/main/jni/OnLoad.cpp deleted file mode 100644 index 550a737ac0..0000000000 --- a/FabricExample/android/app/src/main/jni/OnLoad.cpp +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -// This C++ file is part of the default configuration used by apps and is placed -// inside react-native to encapsulate it from user space (so you won't need to -// touch C++/Cmake code at all on Android). -// -// If you wish to customize it (because you want to manually link a C++ library -// or pass a custom compilation flag) you can: -// -// 1. Copy this CMake file inside the `android/app/src/main/jni` folder of your -// project -// 2. Copy the OnLoad.cpp (in this same folder) file inside the same folder as -// above. -// 3. Extend your `android/app/build.gradle` as follows -// -// android { -// // Other config here... -// externalNativeBuild { -// cmake { -// path "src/main/jni/CMakeLists.txt" -// } -// } -// } - -#include -#include -#include -#include -#include -#include - -namespace facebook::react { - -void registerComponents( - std::shared_ptr registry) { - // Custom Fabric Components go here. You can register custom - // components coming from your App or from 3rd party libraries here. - // - // providerRegistry->add(concreteComponentDescriptorProvider< - // AocViewerComponentDescriptor>()); - - // By default we just use the components autolinked by RN CLI - rncli_registerProviders(registry); -} - -std::shared_ptr cxxModuleProvider( - const std::string& name, - const std::shared_ptr& jsInvoker) { - // Not implemented yet: provide pure-C++ NativeModules here. - if (name == "RNGHTurboCppModule") { - return std::make_shared(jsInvoker); - } - return nullptr; -} - -std::shared_ptr javaModuleProvider( - const std::string& name, - const JavaTurboModule::InitParams& params) { - // Here you can provide your own module provider for TurboModules coming from - // either your application or from external libraries. The approach to follow - // is similar to the following (for a library called `samplelibrary`): - // - // auto module = samplelibrary_ModuleProvider(moduleName, params); - // if (module != nullptr) { - // return module; - // } - // return rncore_ModuleProvider(moduleName, params); - - // By default we just use the module providers autolinked by RN CLI - return rncli_ModuleProvider(name, params); -} - -} // namespace facebook::react - -JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM* vm, void*) { - return facebook::jni::initialize(vm, [] { - facebook::react::DefaultTurboModuleManagerDelegate::cxxModuleProvider = - &facebook::react::cxxModuleProvider; - facebook::react::DefaultTurboModuleManagerDelegate::javaModuleProvider = - &facebook::react::javaModuleProvider; - facebook::react::DefaultComponentsRegistry:: - registerComponentDescriptorsFromEntryPoint = - &facebook::react::registerComponents; - }); -} diff --git a/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerModule.kt b/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerModule.kt index d786284053..a15b75d47c 100644 --- a/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerModule.kt +++ b/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerModule.kt @@ -411,7 +411,6 @@ class RNGestureHandlerModule(reactContext: ReactApplicationContext?) : @ReactMethod(isBlockingSynchronousMethod = true) fun install(): Boolean { return try { - SoLoader.loadLibrary("gesturehandler") val jsContext = reactApplicationContext.javaScriptContextHolder!! decorateRuntime(jsContext.get()) true @@ -611,6 +610,10 @@ class RNGestureHandlerModule(reactContext: ReactApplicationContext?) : } companion object { + init { + // we need here so it is called before cpp turbo module is requested + SoLoader.loadLibrary("gesturehandler") + } const val MODULE_NAME = "RNGestureHandlerModule" private const val KEY_SHOULD_CANCEL_WHEN_OUTSIDE = "shouldCancelWhenOutside" private const val KEY_ENABLED = "enabled" diff --git a/android/src/main/jni/CMakeLists.txt b/android/src/main/jni/CMakeLists.txt index 74dd773ab3..3ed088449a 100644 --- a/android/src/main/jni/CMakeLists.txt +++ b/android/src/main/jni/CMakeLists.txt @@ -14,18 +14,26 @@ set(REACT_ANDROID_DIR "${REACT_NATIVE_DIR}/ReactAndroid") include(${REACT_ANDROID_DIR}/cmake-utils/folly-flags.cmake) add_compile_options(${folly_FLAGS}) +file(GLOB tm_SRC CONFIGURE_DEPENDS ${REACT_ANDROID_DIR}/../../../node_modules/react-native-gesture-handler/common/cpp/*.cpp) +file(GLOB tm_generated_SRC CONFIGURE_DEPENDS *.cpp ${CMAKE_CURRENT_SOURCE_DIR}/../../../build/generated/source/codegen/jni/react/renderer/components/rngesturehandler_codegen/rngesturehandler_codegenJSI-generated.cpp) + add_library(${PACKAGE_NAME} SHARED cpp-adapter.cpp + ${tm_SRC} + ${tm_generated_SRC} ) target_include_directories( ${PACKAGE_NAME} - PRIVATE + PUBLIC + "${CMAKE_CURRENT_SOURCE_DIR}/../../../../common/cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/../../../build/generated/source/codegen/jni/react/renderer/components/rngesturehandler_codegen" "${REACT_NATIVE_DIR}/ReactCommon" ) find_package(ReactAndroid REQUIRED CONFIG) +find_package(fbjni REQUIRED CONFIG) target_link_libraries( gesturehandler @@ -34,4 +42,7 @@ target_link_libraries( ReactAndroid::react_render_graphics ReactAndroid::jsi ReactAndroid::react_nativemodule_core + fbjni::fbjni + ReactAndroid::turbomodulejsijni + ReactAndroid::react_newarchdefaults ) diff --git a/android/src/main/jni/cpp-adapter.cpp b/android/src/main/jni/cpp-adapter.cpp index 6b1d41780d..5597e7e4e7 100644 --- a/android/src/main/jni/cpp-adapter.cpp +++ b/android/src/main/jni/cpp-adapter.cpp @@ -1,44 +1,42 @@ #include #include +#include "RNGHTurboCppModule.h" +#include +#include -#include +std::function( + const std::string&, + const std::shared_ptr&)> cxxModuleProviderHolder; -using namespace facebook; -using namespace react; +namespace facebook::react { -void decorateRuntime(jsi::Runtime &runtime) { - auto isFormsStackingContext = jsi::Function::createFromHostFunction( - runtime, - jsi::PropNameID::forAscii(runtime, "isFormsStackingContext"), - 1, - [](jsi::Runtime &runtime, - const jsi::Value &thisValue, - const jsi::Value *arguments, - size_t count) -> jsi::Value { - if (!arguments[0].isObject()) { - return jsi::Value::null(); - } - - auto shadowNode = arguments[0] - .asObject(runtime) - .getHostObject(runtime) - ->shadowNode; - bool isFormsStackingContext = shadowNode->getTraits().check( - ShadowNodeTraits::FormsStackingContext); - - return jsi::Value(isFormsStackingContext); - }); - runtime.global().setProperty( - runtime, "isFormsStackingContext", std::move(isFormsStackingContext)); -} extern "C" JNIEXPORT void JNICALL Java_com_swmansion_gesturehandler_react_RNGestureHandlerModule_decorateRuntime( - JNIEnv *env, - jobject clazz, - jlong jsiPtr) { - jsi::Runtime *runtime = reinterpret_cast(jsiPtr); - if (runtime) { - decorateRuntime(*runtime); - } + JNIEnv *env, + jobject clazz, + jlong jsiPtr) { + jsi::Runtime *runtime = reinterpret_cast(jsiPtr); + if (runtime) { + RNGHdecorateRuntime(*runtime); + } } + +std::shared_ptr cxxModuleProvider( + const std::string& name, + const std::shared_ptr& jsInvoker) { + if (name == "RNGHTurboCppModule") { + return std::make_shared(jsInvoker); + } + return cxxModuleProviderHolder(name, jsInvoker); +} + +} // namespace facebook::react + +JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM* vm, void*) { + cxxModuleProviderHolder = facebook::react::DefaultTurboModuleManagerDelegate::cxxModuleProvider; + return facebook::jni::initialize(vm, [] { + facebook::react::DefaultTurboModuleManagerDelegate::cxxModuleProvider = + &facebook::react::cxxModuleProvider; + }); +} \ No newline at end of file diff --git a/common/cpp/CMakeLists.txt b/common/cpp/CMakeLists.txt deleted file mode 100644 index e955cdf089..0000000000 --- a/common/cpp/CMakeLists.txt +++ /dev/null @@ -1,32 +0,0 @@ -cmake_minimum_required(VERSION 3.13) -set(CMAKE_VERBOSE_MAKEFILE on) -set(PACKAGE_NAME "gesturehandler") - -add_compile_options( - -fexceptions - -frtti - -std=c++20) - -file(GLOB tm_SRC CONFIGURE_DEPENDS *.cpp) -add_library(tm STATIC ${tm_SRC}) - -target_include_directories(tm PUBLIC .) -target_include_directories(react_codegen_rngesturehandler_codegen PUBLIC .) - -target_include_directories( - tm - PRIVATE - "${REACT_NATIVE_DIR}/ReactCommon" -) - -find_package(ReactAndroid REQUIRED CONFIG) - -target_link_libraries( - tm - ReactAndroid::react_render_core - ReactAndroid::react_render_uimanager - ReactAndroid::react_render_graphics - ReactAndroid::jsi - ReactAndroid::react_nativemodule_core - react_codegen_rngesturehandler_codegen - ) diff --git a/common/cpp/RNGHTurboCppModule.cpp b/common/cpp/RNGHTurboCppModule.cpp index dcc7e026c3..8b4d26979a 100644 --- a/common/cpp/RNGHTurboCppModule.cpp +++ b/common/cpp/RNGHTurboCppModule.cpp @@ -1,36 +1,39 @@ #include "RNGHTurboCppModule.h" -#include #include namespace facebook::react { +void RNGHdecorateRuntime(jsi::Runtime &runtime) { + auto isFormsStackingContext = jsi::Function::createFromHostFunction( + runtime, + jsi::PropNameID::forAscii(runtime, "isFormsStackingContext"), + 1, + [](jsi::Runtime &runtime, + const jsi::Value &thisValue, + const jsi::Value *arguments, + size_t count) -> jsi::Value { + if (!arguments[0].isObject()) { + return jsi::Value::null(); + } + + auto shadowNode = arguments[0] + .asObject(runtime) + .getHostObject(runtime) + ->shadowNode; + bool isFormsStackingContext = shadowNode->getTraits().check( + ShadowNodeTraits::FormsStackingContext); + + return jsi::Value(isFormsStackingContext); + }); + runtime.global().setProperty( + runtime, "isFormsStackingContext", std::move(isFormsStackingContext)); +} + RNGHTurboCppModule::RNGHTurboCppModule(std::shared_ptr jsInvoker) : NativeRNGHTurboCppModuleCxxSpec(std::move(jsInvoker)) {} bool RNGHTurboCppModule::installBridgeless(jsi::Runtime& runtime) { - auto isFormsStackingContext = jsi::Function::createFromHostFunction( - runtime, - jsi::PropNameID::forAscii(runtime, "isFormsStackingContext"), - 1, - [](jsi::Runtime &runtime, - const jsi::Value &thisValue, - const jsi::Value *arguments, - size_t count) -> jsi::Value { - if (!arguments[0].isObject()) { - return jsi::Value::null(); - } - - auto shadowNode = arguments[0] - .asObject(runtime) - .getHostObject(runtime) - ->shadowNode; - bool isFormsStackingContext = shadowNode->getTraits().check( - ShadowNodeTraits::FormsStackingContext); - - return jsi::Value(isFormsStackingContext); - }); - runtime.global().setProperty( - runtime, "isFormsStackingContext", std::move(isFormsStackingContext)); + RNGHdecorateRuntime(runtime); return true; } diff --git a/common/cpp/RNGHTurboCppModule.h b/common/cpp/RNGHTurboCppModule.h index 1d85c3d793..7efaece752 100644 --- a/common/cpp/RNGHTurboCppModule.h +++ b/common/cpp/RNGHTurboCppModule.h @@ -10,6 +10,8 @@ namespace facebook::react { +void RNGHdecorateRuntime(jsi::Runtime &runtime); + class RNGHTurboCppModule : public NativeRNGHTurboCppModuleCxxSpec { public: RNGHTurboCppModule(std::shared_ptr jsInvoker); @@ -17,4 +19,6 @@ class RNGHTurboCppModule : public NativeRNGHTurboCppModuleCxxSpec Date: Tue, 9 Jan 2024 18:12:22 +0100 Subject: [PATCH 3/6] fix: make it work with bridge and on old arch --- FabricExample/android/app/build.gradle | 4 --- FabricExample/android/settings.gradle | 2 +- FabricExample/ios/Podfile.lock | 2 +- RNGestureHandler.podspec | 6 +++- .../react/RNGestureHandlerModule.kt | 6 ++-- android/src/main/jni/cpp-adapter.cpp | 4 +-- apple/RNGestureHandlerModule.h | 11 ------- apple/RNGestureHandlerModule.mm | 29 ++----------------- common/cpp/RNGHTurboCppModule.cpp | 4 +-- common/cpp/RNGHTurboCppModule.h | 4 +-- common/cpp/RNGHTurboCppModule.mm | 15 ---------- src/handlers/createHandler.tsx | 1 + 12 files changed, 19 insertions(+), 69 deletions(-) delete mode 100644 common/cpp/RNGHTurboCppModule.mm diff --git a/FabricExample/android/app/build.gradle b/FabricExample/android/app/build.gradle index 6290d62c9e..4188518176 100644 --- a/FabricExample/android/app/build.gradle +++ b/FabricExample/android/app/build.gradle @@ -79,10 +79,6 @@ def enableProguardInReleaseBuilds = false */ def jscFlavor = 'org.webkit:android-jsc:+' -def safeExtGet(prop, fallback) { - rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback -} - /** * Private function to get the list of Native Architectures you want to build. * This reads the value from reactNativeArchitectures in your gradle.properties diff --git a/FabricExample/android/settings.gradle b/FabricExample/android/settings.gradle index 22aaecbbcc..dc9f27834f 100644 --- a/FabricExample/android/settings.gradle +++ b/FabricExample/android/settings.gradle @@ -10,4 +10,4 @@ includeBuild('../node_modules/react-native') { substitute(module("com.facebook.react:hermes-android")).using(project(":packages:react-native:ReactAndroid:hermes-engine")) substitute(module("com.facebook.react:hermes-engine")).using(project(":packages:react-native:ReactAndroid:hermes-engine")) } -} \ No newline at end of file +} diff --git a/FabricExample/ios/Podfile.lock b/FabricExample/ios/Podfile.lock index ca4dc969a0..aaeeb30eb1 100644 --- a/FabricExample/ios/Podfile.lock +++ b/FabricExample/ios/Podfile.lock @@ -1439,7 +1439,7 @@ SPEC CHECKSUMS: React-runtimescheduler: 77543c74df984ce56c09d49d427149c53784aaf6 React-utils: 42708ea436853045ef1eaff29996813d9fbbe209 ReactCommon: 851280fb976399ca1aabc74cc2c3612069ea70a2 - RNGestureHandler: 89a7087454ae0a90d8fa980491077167a00e5517 + RNGestureHandler: 76cb9f767ff56c3e77bcbbbc5ed9c1cc069bbe56 SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17 Yoga: 44003f970aa541b79dfdd59cf236fda41bd5890f diff --git a/RNGestureHandler.podspec b/RNGestureHandler.podspec index 6ee238b09c..96c8a20587 100644 --- a/RNGestureHandler.podspec +++ b/RNGestureHandler.podspec @@ -14,7 +14,11 @@ Pod::Spec.new do |s| s.license = "MIT" s.author = { package["author"]["name"] => package["author"]["email"] } s.source = { :git => "https://github.com/software-mansion/react-native-gesture-handler", :tag => "#{s.version}" } - s.source_files = ["apple/**/*.{h,m,mm}", "common/cpp/**/*.{mm,h}"] + if new_arch_enabled + s.source_files = ["apple/**/*.{h,m,mm}", "common/cpp/**/*.{cpp,h}"] + else + s.source_files = ["apple/**/*.{h,m,mm}"] + end s.requires_arc = true s.platforms = { ios: apple_platform, tvos: apple_platform, osx: '10.15' } diff --git a/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerModule.kt b/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerModule.kt index a15b75d47c..9f61c7aa60 100644 --- a/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerModule.kt +++ b/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerModule.kt @@ -611,8 +611,10 @@ class RNGestureHandlerModule(reactContext: ReactApplicationContext?) : companion object { init { - // we need here so it is called before cpp turbo module is requested - SoLoader.loadLibrary("gesturehandler") + if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) { + // we need here so it is called before cpp turbo module is requested + SoLoader.loadLibrary("gesturehandler") + } } const val MODULE_NAME = "RNGestureHandlerModule" private const val KEY_SHOULD_CANCEL_WHEN_OUTSIDE = "shouldCancelWhenOutside" diff --git a/android/src/main/jni/cpp-adapter.cpp b/android/src/main/jni/cpp-adapter.cpp index 5597e7e4e7..3a0ecd20ce 100644 --- a/android/src/main/jni/cpp-adapter.cpp +++ b/android/src/main/jni/cpp-adapter.cpp @@ -18,7 +18,7 @@ Java_com_swmansion_gesturehandler_react_RNGestureHandlerModule_decorateRuntime( jlong jsiPtr) { jsi::Runtime *runtime = reinterpret_cast(jsiPtr); if (runtime) { - RNGHdecorateRuntime(*runtime); + RNGHDecorateRuntime(*runtime); } } @@ -39,4 +39,4 @@ JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM* vm, void*) { facebook::react::DefaultTurboModuleManagerDelegate::cxxModuleProvider = &facebook::react::cxxModuleProvider; }); -} \ No newline at end of file +} diff --git a/apple/RNGestureHandlerModule.h b/apple/RNGestureHandlerModule.h index 9e0e56d8f6..4e0cf29f58 100644 --- a/apple/RNGestureHandlerModule.h +++ b/apple/RNGestureHandlerModule.h @@ -2,17 +2,6 @@ #import #import -#ifdef RCT_NEW_ARCH_ENABLED -// TODO: needed to be able to use namespace, but can be done better for sure -#import -using namespace facebook; -using namespace react; -#endif // RCT_NEW_ARCH_ENABLED - @interface RNGestureHandlerModule : RCTEventEmitter -#ifdef RCT_NEW_ARCH_ENABLED -+ (void)installWithRuntime:(jsi::Runtime *)runtime; -#endif // RCT_NEW_ARCH_ENABLED - @end diff --git a/apple/RNGestureHandlerModule.mm b/apple/RNGestureHandlerModule.mm index bf4f89f0d7..ad4880089d 100644 --- a/apple/RNGestureHandlerModule.mm +++ b/apple/RNGestureHandlerModule.mm @@ -15,6 +15,7 @@ #import #import +#import "RNGHTurboCppModule.h" #endif // RCT_NEW_ARCH_ENABLED #import "RNGestureHandler.h" @@ -83,27 +84,6 @@ - (dispatch_queue_t)methodQueue return RCTGetUIManagerQueue(); } -#ifdef RCT_NEW_ARCH_ENABLED -void decorateRuntime(jsi::Runtime &runtime) -{ - auto isFormsStackingContext = jsi::Function::createFromHostFunction( - runtime, - jsi::PropNameID::forAscii(runtime, "isFormsStackingContext"), - 1, - [](jsi::Runtime &runtime, const jsi::Value &thisValue, const jsi::Value *arguments, size_t count) -> jsi::Value { - if (!arguments[0].isObject()) { - return jsi::Value::null(); - } - - auto shadowNode = arguments[0].asObject(runtime).getHostObject(runtime)->shadowNode; - bool isFormsStackingContext = shadowNode->getTraits().check(ShadowNodeTraits::FormsStackingContext); - - return jsi::Value(isFormsStackingContext); - }); - runtime.global().setProperty(runtime, "isFormsStackingContext", std::move(isFormsStackingContext)); -} -#endif // RCT_NEW_ARCH_ENABLED - - (void)setBridge:(RCTBridge *)bridge { [super setBridge:bridge]; @@ -125,16 +105,11 @@ - (void)setBridge:(RCTBridge *)bridge RCTCxxBridge *cxxBridge = (RCTCxxBridge *)self.bridge; auto runtime = (jsi::Runtime *)cxxBridge.runtime; if (runtime) { - decorateRuntime(*runtime); + RNGHDecorateRuntime(*runtime); return @true; } return @false; } - -+ (void)installWithRuntime:(jsi::Runtime *)runtime -{ - decorateRuntime(*runtime); -} #endif // RCT_NEW_ARCH_ENABLED RCT_EXPORT_METHOD(createGestureHandler diff --git a/common/cpp/RNGHTurboCppModule.cpp b/common/cpp/RNGHTurboCppModule.cpp index 8b4d26979a..cc62c67667 100644 --- a/common/cpp/RNGHTurboCppModule.cpp +++ b/common/cpp/RNGHTurboCppModule.cpp @@ -3,7 +3,7 @@ namespace facebook::react { -void RNGHdecorateRuntime(jsi::Runtime &runtime) { +void RNGHDecorateRuntime(jsi::Runtime &runtime) { auto isFormsStackingContext = jsi::Function::createFromHostFunction( runtime, jsi::PropNameID::forAscii(runtime, "isFormsStackingContext"), @@ -33,7 +33,7 @@ RNGHTurboCppModule::RNGHTurboCppModule(std::shared_ptr jsInvoker) : NativeRNGHTurboCppModuleCxxSpec(std::move(jsInvoker)) {} bool RNGHTurboCppModule::installBridgeless(jsi::Runtime& runtime) { - RNGHdecorateRuntime(runtime); + RNGHDecorateRuntime(runtime); return true; } diff --git a/common/cpp/RNGHTurboCppModule.h b/common/cpp/RNGHTurboCppModule.h index 7efaece752..c6d2fe8cba 100644 --- a/common/cpp/RNGHTurboCppModule.h +++ b/common/cpp/RNGHTurboCppModule.h @@ -10,7 +10,7 @@ namespace facebook::react { -void RNGHdecorateRuntime(jsi::Runtime &runtime); +void RNGHDecorateRuntime(jsi::Runtime &runtime); class RNGHTurboCppModule : public NativeRNGHTurboCppModuleCxxSpec { public: @@ -19,6 +19,4 @@ class RNGHTurboCppModule : public NativeRNGHTurboCppModuleCxxSpec - -namespace facebook::react { - -RNGHTurboCppModule::RNGHTurboCppModule(std::shared_ptr jsInvoker) - : NativeRNGHTurboCppModuleCxxSpec(std::move(jsInvoker)) {} - -bool RNGHTurboCppModule::installBridgeless(jsi::Runtime& rt) { - [RNGestureHandlerModule installWithRuntime:&rt]; - return YES; -} - -} // namespace facebook::react diff --git a/src/handlers/createHandler.tsx b/src/handlers/createHandler.tsx index 3b4f7bf961..89fd977024 100644 --- a/src/handlers/createHandler.tsx +++ b/src/handlers/createHandler.tsx @@ -5,6 +5,7 @@ import { DeviceEventEmitter, EmitterSubscription, } from 'react-native'; +// @ts-ignore - its taken straight from RN import { customDirectEventTypes } from 'react-native/Libraries/Renderer/shims/ReactNativeViewConfigRegistry'; // @ts-ignore - it isn't typed by TS & don't have definitelyTyped types import deepEqual from 'lodash/isEqual'; From 3e699030ba9a4fa1c918bec2a9e5884958916609 Mon Sep 17 00:00:00 2001 From: Wojciech Lewicki Date: Wed, 10 Jan 2024 15:12:47 +0100 Subject: [PATCH 4/6] fix: create manager on bridgeless --- apple/RNGestureHandlerModule.h | 3 ++- apple/RNGestureHandlerModule.mm | 9 +++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/apple/RNGestureHandlerModule.h b/apple/RNGestureHandlerModule.h index cbd599c308..703570d9d1 100644 --- a/apple/RNGestureHandlerModule.h +++ b/apple/RNGestureHandlerModule.h @@ -2,6 +2,7 @@ #import #ifdef RN_FABRIC_ENABLED +#import #import #else #import @@ -9,7 +10,7 @@ @interface RNGestureHandlerModule : RCTEventEmitter #ifdef RN_FABRIC_ENABLED - + #else #endif diff --git a/apple/RNGestureHandlerModule.mm b/apple/RNGestureHandlerModule.mm index ee9961c483..4a5db91893 100644 --- a/apple/RNGestureHandlerModule.mm +++ b/apple/RNGestureHandlerModule.mm @@ -86,6 +86,12 @@ - (dispatch_queue_t)methodQueue return RCTGetUIManagerQueue(); } +- (void)initialize +{ + _manager = [[RNGestureHandlerManager alloc] initWithUIManager:[self.moduleRegistry moduleForName:"RCTUIManager"] + eventDispatcher:[self.moduleRegistry moduleForName:"EventDispatcher"]]; +} + - (void)setBridge:(RCTBridge *)bridge { [super setBridge:bridge]; @@ -104,8 +110,7 @@ - (void)setBridge:(RCTBridge *)bridge #ifdef RCT_NEW_ARCH_ENABLED RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(install) { - RCTCxxBridge *cxxBridge = (RCTCxxBridge *)self.bridge; - if (!cxxBridge.runtime) { + if (!self.bridge) { return @false; } [self.bridge From a02b06c4dd26f530437571388a38bc1b0876d81f Mon Sep 17 00:00:00 2001 From: Wojciech Lewicki Date: Wed, 10 Jan 2024 16:51:16 +0100 Subject: [PATCH 5/6] feat: make bridgeless work with turbomodule --- apple/RNGestureHandlerManager.h | 5 +++++ apple/RNGestureHandlerManager.mm | 38 +++++++++++++++++++++++++++----- apple/RNGestureHandlerModule.mm | 29 +++++++++++++++--------- 3 files changed, 56 insertions(+), 16 deletions(-) diff --git a/apple/RNGestureHandlerManager.h b/apple/RNGestureHandlerManager.h index 59334d6459..a191817419 100644 --- a/apple/RNGestureHandlerManager.h +++ b/apple/RNGestureHandlerManager.h @@ -9,8 +9,13 @@ @interface RNGestureHandlerManager : NSObject +#ifdef RCT_NEW_ARCH_ENABLED +- (nonnull instancetype)initWithModuleRegistry:(nonnull RCTModuleRegistry *)moduleRegistry + viewRegistry:(nonnull RCTViewRegistry *)viewRegistry; +#else - (nonnull instancetype)initWithUIManager:(nonnull RCTUIManager *)uiManager eventDispatcher:(nonnull id)eventDispatcher; +#endif // RCT_NEW_ARCH_ENABLED - (void)createGestureHandler:(nonnull NSString *)handlerName tag:(nonnull NSNumber *)handlerTag diff --git a/apple/RNGestureHandlerManager.mm b/apple/RNGestureHandlerManager.mm index 7754cc1e68..7983c49477 100644 --- a/apple/RNGestureHandlerManager.mm +++ b/apple/RNGestureHandlerManager.mm @@ -49,26 +49,48 @@ @interface RNGestureHandlerManager () *_rootViewGestureRecognizers; NSMutableDictionary *_attachRetryCounter; +#ifdef RCT_NEW_ARCH_ENABLED + RCTModuleRegistry *_moduleRegistry; + RCTViewRegistry *_viewRegistry; +#else + RCTUIManager *_uiManager; +#endif // RCT_NEW_ARCH_ENABLED id _eventDispatcher; id _reanimatedModule; } +#ifdef RCT_NEW_ARCH_ENABLED +- (instancetype)initWithModuleRegistry:(RCTModuleRegistry *)moduleRegistry viewRegistry:(RCTViewRegistry *)viewRegistry +{ + if ((self = [super init])) { + _moduleRegistry = moduleRegistry; + _viewRegistry = viewRegistry; + _eventDispatcher = [_moduleRegistry moduleForName:"EventDispatcher"]; + [self initCommonProps]; + } + return self; +} +#else - (instancetype)initWithUIManager:(RCTUIManager *)uiManager eventDispatcher:(id)eventDispatcher { if ((self = [super init])) { _uiManager = uiManager; _eventDispatcher = eventDispatcher; - _registry = [RNGestureHandlerRegistry new]; - _rootViewGestureRecognizers = [NSHashTable hashTableWithOptions:NSPointerFunctionsWeakMemory]; - _attachRetryCounter = [[NSMutableDictionary alloc] init]; - _reanimatedModule = nil; + [self initCommonProps]; } return self; } +#endif // RCT_NEW_ARCH_ENABLED + +- (void)initCommonProps +{ + _registry = [RNGestureHandlerRegistry new]; + _rootViewGestureRecognizers = [NSHashTable hashTableWithOptions:NSPointerFunctionsWeakMemory]; + _attachRetryCounter = [[NSMutableDictionary alloc] init]; +} - (void)createGestureHandler:(NSString *)handlerName tag:(NSNumber *)handlerTag config:(NSDictionary *)config { @@ -115,7 +137,11 @@ - (void)attachGestureHandler:(nonnull NSNumber *)handlerTag toViewWithTag:(nonnull NSNumber *)viewTag withActionType:(RNGestureHandlerActionType)actionType { +#ifdef RCT_NEW_ARCH_ENABLED + RNGHUIView *view = [_viewRegistry viewForReactTag:viewTag]; +#else RNGHUIView *view = [_uiManager viewForReactTag:viewTag]; +#endif // RCT_NEW_ARCH_ENABLED #ifdef RCT_NEW_ARCH_ENABLED if (view == nil || view.superview == nil) { @@ -350,7 +376,7 @@ - (void)sendEventForReanimated:(RNGestureHandlerStateChange *)event #ifdef RCT_NEW_ARCH_ENABLED // Send event directly to Reanimated if (_reanimatedModule == nil) { - _reanimatedModule = [_uiManager.bridge moduleForName:@"ReanimatedModule"]; + _reanimatedModule = [_moduleRegistry moduleForName:"ReanimatedModule"]; } [_reanimatedModule eventDispatcherWillDispatchEvent:event]; diff --git a/apple/RNGestureHandlerModule.mm b/apple/RNGestureHandlerModule.mm index fa4743e588..740d735de6 100644 --- a/apple/RNGestureHandlerModule.mm +++ b/apple/RNGestureHandlerModule.mm @@ -51,6 +51,10 @@ @implementation RNGestureHandlerModule { NSMutableArray *_operations; } +#ifdef RCT_NEW_ARCH_ENABLED +@synthesize viewRegistry_DEPRECATED = _viewRegistry_DEPRECATED; +#endif // RCT_NEW_ARCH_ENABLED + RCT_EXPORT_MODULE() + (BOOL)requiresMainQueueSetup @@ -83,18 +87,25 @@ - (dispatch_queue_t)methodQueue return RCTGetUIManagerQueue(); } +#ifdef RCT_NEW_ARCH_ENABLED - (void)initialize { - _manager = [[RNGestureHandlerManager alloc] initWithUIManager:[self.moduleRegistry moduleForName:"RCTUIManager"] - eventDispatcher:[self.moduleRegistry moduleForName:"EventDispatcher"]]; + _manager = [[RNGestureHandlerManager alloc] initWithModuleRegistry:self.moduleRegistry + viewRegistry:_viewRegistry_DEPRECATED]; + _operations = [NSMutableArray new]; } +#endif // RCT_NEW_ARCH_ENABLED - (void)setBridge:(RCTBridge *)bridge { [super setBridge:bridge]; - +#ifdef RCT_NEW_ARCH_ENABLED + _manager = [[RNGestureHandlerManager alloc] initWithModuleRegistry:self.moduleRegistry + viewRegistry:_viewRegistry_DEPRECATED]; +#else _manager = [[RNGestureHandlerManager alloc] initWithUIManager:bridge.uiManager eventDispatcher:bridge.eventDispatcher]; +#endif // RCT_NEW_ARCH_ENABLED _operations = [NSMutableArray new]; #ifndef RCT_NEW_ARCH_ENABLED @@ -178,13 +189,11 @@ - (void)setBridge:(RCTBridge *)bridge NSArray *operations = _operations; _operations = [NSMutableArray new]; - - [self.bridge.uiManager - addUIBlock:^(__unused RCTUIManager *manager, __unused NSDictionary *viewRegistry) { - for (GestureHandlerOperation operation in operations) { - operation(self->_manager); - } - }]; + [self.viewRegistry_DEPRECATED addUIBlock:^(RCTViewRegistry *viewRegistry) { + for (GestureHandlerOperation operation in operations) { + operation(self->_manager); + } + }]; #endif // RCT_NEW_ARCH_ENABLED } From 6018613d8c3be818920aa811b975110d85d76dce Mon Sep 17 00:00:00 2001 From: Wojciech Lewicki Date: Wed, 10 Jan 2024 17:35:46 +0100 Subject: [PATCH 6/6] fix: lint --- .../gesturehandler/react/RNGestureHandlerModule.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerModule.kt b/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerModule.kt index 816223fa3b..f0bd995f08 100644 --- a/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerModule.kt +++ b/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerModule.kt @@ -447,10 +447,10 @@ class RNGestureHandlerModule(reactContext: ReactApplicationContext?) : return false } reactApplicationContext.runOnJSQueueThread { - SoLoader.loadLibrary("gesturehandler") - val jsContext = reactApplicationContext.javaScriptContextHolder!! - decorateRuntime(jsContext.get()) - } + SoLoader.loadLibrary("gesturehandler") + val jsContext = reactApplicationContext.javaScriptContextHolder!! + decorateRuntime(jsContext.get()) + } true } catch (exception: Exception) { Log.w("[RNGestureHandler]", "Could not install JSI bindings.")