Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
119 commits
Select commit Hold shift + click to select a range
23f1938
Fix compatibility with [email protected] on Android
piaskowyk Aug 10, 2023
0558d34
Use current branch
piaskowyk Aug 10, 2023
b80f39c
Use current branch
piaskowyk Aug 10, 2023
38674e7
Fix typo
piaskowyk Aug 10, 2023
def20f4
test v1
piaskowyk Aug 10, 2023
a5996a8
test v2
piaskowyk Aug 10, 2023
0f27e01
Restore iOS
piaskowyk Aug 10, 2023
ca2b4d7
Fix Android build
piaskowyk Aug 10, 2023
0ec377d
Merge branch '@piaskowyk/rn73-nightly-android' of github.com:software…
piaskowyk Aug 10, 2023
c4dbae4
Replace .cpp with .h
piaskowyk Aug 10, 2023
d00d6a5
Format
piaskowyk Aug 10, 2023
5d490bd
Restore function
piaskowyk Aug 10, 2023
1a68856
Add if for RN version
piaskowyk Aug 10, 2023
9942e8b
if for new arch
piaskowyk Aug 10, 2023
87e5623
Backward compatibility
piaskowyk Aug 11, 2023
2b0160c
Fix function definition
piaskowyk Aug 11, 2023
bdd5cc1
Set minimal version for iOS
piaskowyk Aug 11, 2023
f079fb6
If for header
piaskowyk Aug 11, 2023
5e51eb2
Fix ios
piaskowyk Aug 11, 2023
6c1a5a9
Fix compatibility with [email protected] on Android
piaskowyk Aug 10, 2023
261fcee
Fix Android build
piaskowyk Aug 10, 2023
6b03043
Use current branch
piaskowyk Aug 10, 2023
0ea0804
Use current branch
piaskowyk Aug 10, 2023
b5f97da
Fix typo
piaskowyk Aug 10, 2023
1391d97
test v1
piaskowyk Aug 10, 2023
5cc4592
test v2
piaskowyk Aug 10, 2023
de88c12
Restore iOS
piaskowyk Aug 10, 2023
ba5e875
Replace .cpp with .h
piaskowyk Aug 10, 2023
fd425a9
Format
piaskowyk Aug 10, 2023
226a4da
Restore function
piaskowyk Aug 10, 2023
10624a6
Add if for RN version
piaskowyk Aug 10, 2023
f64a8a2
if for new arch
piaskowyk Aug 10, 2023
55d17f7
Backward compatibility
piaskowyk Aug 11, 2023
0afeadd
Fix function definition
piaskowyk Aug 11, 2023
dfe123d
Set minimal version for iOS
piaskowyk Aug 11, 2023
120cc76
If for header
piaskowyk Aug 11, 2023
fb4eb17
Fix ios
piaskowyk Aug 11, 2023
bad8f50
Merge branch '@piaskowyk/rn73-nightly-android' of github.com:software…
piaskowyk Aug 23, 2023
d300f90
Merge branch 'main' into @piaskowyk/rn73-nightly-android
piaskowyk Aug 23, 2023
3038d0b
Update Common/cpp/NativeModules/NativeReanimatedModule.cpp
piaskowyk Aug 23, 2023
7df732e
Update Common/cpp/NativeModules/NativeReanimatedModule.cpp
piaskowyk Aug 23, 2023
69706d0
Update Common/cpp/NativeModules/NativeReanimatedModule.cpp
piaskowyk Aug 23, 2023
48f5ca4
Remove const
piaskowyk Aug 23, 2023
776d73d
Fix compatibility with [email protected] on Android
piaskowyk Aug 10, 2023
31abb45
Fix Android build
piaskowyk Aug 10, 2023
19183b1
Use current branch
piaskowyk Aug 10, 2023
dd6fd09
Use current branch
piaskowyk Aug 10, 2023
ea07335
Fix typo
piaskowyk Aug 10, 2023
b69f2d3
test v1
piaskowyk Aug 10, 2023
a3298a2
test v2
piaskowyk Aug 10, 2023
9a6fe65
Restore iOS
piaskowyk Aug 10, 2023
621cb5c
Replace .cpp with .h
piaskowyk Aug 10, 2023
ad57aa0
Format
piaskowyk Aug 10, 2023
24a14ce
Restore function
piaskowyk Aug 10, 2023
676696e
Add if for RN version
piaskowyk Aug 10, 2023
88c5204
if for new arch
piaskowyk Aug 10, 2023
1bc9a45
Backward compatibility
piaskowyk Aug 11, 2023
e240091
Fix function definition
piaskowyk Aug 11, 2023
5df019c
Set minimal version for iOS
piaskowyk Aug 11, 2023
c8cb781
If for header
piaskowyk Aug 11, 2023
f8dac31
Fix ios
piaskowyk Aug 11, 2023
72671a9
Fix Android build
piaskowyk Aug 10, 2023
41b0b62
test v1
piaskowyk Aug 10, 2023
fc80472
test v2
piaskowyk Aug 10, 2023
4eac148
Restore iOS
piaskowyk Aug 10, 2023
a2ddeb8
Replace .cpp with .h
piaskowyk Aug 10, 2023
eee81fd
Restore function
piaskowyk Aug 10, 2023
5dc6db7
Add if for RN version
piaskowyk Aug 10, 2023
134b658
if for new arch
piaskowyk Aug 10, 2023
ac4516d
Update Common/cpp/NativeModules/NativeReanimatedModule.cpp
piaskowyk Aug 23, 2023
62fa8d7
Update Common/cpp/NativeModules/NativeReanimatedModule.cpp
piaskowyk Aug 23, 2023
5dadd54
Update Common/cpp/NativeModules/NativeReanimatedModule.cpp
piaskowyk Aug 23, 2023
6fe6770
Remove const
piaskowyk Aug 23, 2023
8d067d3
Update check-react-native-nightly.yml
piaskowyk Aug 23, 2023
42470b1
Update check-react-native-nightly.yml
piaskowyk Aug 23, 2023
4f77528
Update check-react-native-nightly.yml
piaskowyk Aug 23, 2023
2459abe
Update check-react-native-nightly.yml
piaskowyk Aug 24, 2023
61927a1
Update check-react-native-nightly.yml
piaskowyk Aug 24, 2023
90d2634
Fixed error during rebase
michalmaka Aug 24, 2023
dfe1e23
Merge branch '@piaskowyk/rn73-nightly-android' of github.com:software…
piaskowyk Aug 24, 2023
604ca02
Update check-react-native-nightly.yml
piaskowyk Aug 24, 2023
5a302f9
Update check-react-native-nightly.yml
piaskowyk Aug 25, 2023
7d5be54
Merge branch 'main' into @piaskowyk/rn73-nightly-android
piaskowyk Aug 31, 2023
ad1929c
Update registry name
piaskowyk Aug 31, 2023
6862ac0
Merge branch '@piaskowyk/rn73-nightly-android' of github.com:software…
piaskowyk Aug 31, 2023
90854b6
Add missing header
piaskowyk Aug 31, 2023
e7c334e
Merge branch 'main' into @piaskowyk/rn73-nightly-android
piaskowyk Sep 12, 2023
82ef22d
Fixes after relocation of chrome inspector
piaskowyk Sep 12, 2023
6824ce4
Lint
piaskowyk Sep 12, 2023
444fd5b
test
piaskowyk Sep 12, 2023
7fd06e0
test2
piaskowyk Sep 12, 2023
2e034b0
test
piaskowyk Sep 13, 2023
53c925d
Merge branch 'main' into @piaskowyk/rn73-nightly-android
piaskowyk Sep 13, 2023
1a470a9
Merge branch 'main' into @piaskowyk/rn73-nightly-android
piaskowyk Sep 21, 2023
77a8ba4
Merge branch 'main' into @piaskowyk/rn73-nightly-android
piaskowyk Sep 26, 2023
0068406
Merge branch 'main' into @piaskowyk/rn73-nightly-android
piaskowyk Oct 2, 2023
39e645d
Merge branch 'main' into @piaskowyk/rn73-nightly-android
piaskowyk Oct 11, 2023
6c9b397
Fix iOS Paper build
piaskowyk Oct 13, 2023
3478e96
Update CLI version
piaskowyk Oct 13, 2023
ee78248
Backward comparibility
piaskowyk Oct 13, 2023
3405151
Merge branch 'main' into @piaskowyk/rn73-nightly-android
piaskowyk Oct 13, 2023
d0d6b2f
Upgrade C++ version on Android
piaskowyk Oct 13, 2023
7eb86c4
Upgrade C++ version on Android
piaskowyk Oct 13, 2023
8071c89
Replace volatile with atomic
piaskowyk Oct 16, 2023
c7f2e53
Restore cli version
piaskowyk Oct 16, 2023
b5b8371
Restore CI changes
piaskowyk Oct 16, 2023
ca63e5b
Restore CI changes
piaskowyk Oct 16, 2023
2f7225e
Fix backward compatibility
piaskowyk Oct 16, 2023
8c0b60a
Add comment
piaskowyk Oct 16, 2023
d65887a
Merge branch 'main' into @piaskowyk/rn73-nightly-android
piaskowyk Oct 26, 2023
0f24bc4
Update CI config
piaskowyk Oct 26, 2023
158139e
Restore
piaskowyk Oct 26, 2023
9e91eac
Simulator options
piaskowyk Oct 27, 2023
6595573
Add CI to test RC
piaskowyk Oct 27, 2023
b0abb89
Set simulator version
piaskowyk Oct 27, 2023
e0a9d8b
Fix backward compatibility
piaskowyk Oct 27, 2023
b157fdc
UIManager changes
piaskowyk Oct 27, 2023
49375ba
CI update
piaskowyk Oct 30, 2023
bb531b3
Improvements after review
piaskowyk Oct 30, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Common/cpp/Fabric/ReanimatedCommitHook.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@ ReanimatedCommitHook::~ReanimatedCommitHook() noexcept {
RootShadowNode::Unshared ReanimatedCommitHook::shadowTreeWillCommit(
ShadowTree const &,
RootShadowNode::Shared const &,
#if REACT_NATIVE_MINOR_VERSION >= 73
RootShadowNode::Unshared const &newRootShadowNode) noexcept {
#else
RootShadowNode::Unshared const &newRootShadowNode) const noexcept {
#endif
if (ReanimatedCommitMarker::isReanimatedCommit()) {
// ShadowTree commited by Reanimated, no need to apply updates from
// PropsRegistry
Expand Down
11 changes: 11 additions & 0 deletions Common/cpp/Fabric/ReanimatedCommitHook.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,16 @@ class ReanimatedCommitHook : public UIManagerCommitHook {

~ReanimatedCommitHook() noexcept override;

#if REACT_NATIVE_MINOR_VERSION >= 73
void commitHookWasRegistered(UIManager const &) noexcept override {}

void commitHookWasUnregistered(UIManager const &) noexcept override {}

RootShadowNode::Unshared shadowTreeWillCommit(
ShadowTree const &shadowTree,
RootShadowNode::Shared const &oldRootShadowNode,
RootShadowNode::Unshared const &newRootShadowNode) noexcept override;
#else
void commitHookWasRegistered(UIManager const &) const noexcept override {}

void commitHookWasUnregistered(UIManager const &) const noexcept override {}
Expand All @@ -28,6 +38,7 @@ class ReanimatedCommitHook : public UIManagerCommitHook {
RootShadowNode::Shared const &oldRootShadowNode,
RootShadowNode::Unshared const &newRootShadowNode)
const noexcept override;
#endif

private:
std::shared_ptr<PropsRegistry> propsRegistry_;
Expand Down
1 change: 0 additions & 1 deletion Common/cpp/LayoutAnimations/LayoutAnimationsManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

#ifndef NDEBUG
#include <utility>
#include "JSLogger.h"
#endif

namespace reanimated {
Expand Down
27 changes: 18 additions & 9 deletions Common/cpp/NativeModules/NativeReanimatedModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
#endif
#include <react/renderer/uimanager/UIManagerBinding.h>
#include <react/renderer/uimanager/primitives.h>
#if REACT_NATIVE_MINOR_VERSION >= 73 && defined(RCT_NEW_ARCH_ENABLED)
#include <react/utils/CoreFeatures.h>
#endif
#endif

#include <functional>
Expand All @@ -30,12 +33,13 @@
#include <fbjni/fbjni.h>
#endif

#ifndef NDEBUG
#include "JSLogger.h"
#endif

using namespace facebook;

#if REACT_NATIVE_MINOR_VERSION >= 73 && defined(RCT_NEW_ARCH_ENABLED)
// Android can't find the definition of this static field
bool CoreFeatures::useNativeState;
#endif

namespace reanimated {

NativeReanimatedModule::NativeReanimatedModule(
Expand Down Expand Up @@ -313,7 +317,7 @@ void NativeReanimatedModule::setShouldAnimateExiting(
const jsi::Value &viewTag,
const jsi::Value &shouldAnimate) {
layoutAnimationsManager_.setShouldAnimateExiting(
viewTag.asNumber(), shouldAnimate.asBool());
viewTag.asNumber(), shouldAnimate.getBool());
}

bool NativeReanimatedModule::isAnyHandlerWaitingForEvent(
Expand Down Expand Up @@ -416,16 +420,20 @@ bool NativeReanimatedModule::handleRawEvent(
// just ignore this event, because it's an event on unmounted component
return false;
}
const std::string &type = rawEvent.type;
const ValueFactory &payloadFactory = rawEvent.payloadFactory;

int tag = eventTarget->getTag();
std::string eventType = type;
auto eventType = rawEvent.type;
if (eventType.rfind("top", 0) == 0) {
eventType = "on" + eventType.substr(3);
}
jsi::Runtime &rt = uiWorkletRuntime_->getJSIRuntime();
#if REACT_NATIVE_MINOR_VERSION >= 73
const auto &eventPayload = rawEvent.eventPayload;
jsi::Value payload = eventPayload->asJSIValue(rt);
#else
const auto &payloadFactory = rawEvent.payloadFactory;
jsi::Value payload = payloadFactory(rt);
#endif

auto res = handleEvent(eventType, tag, std::move(payload), currentTime);
// TODO: we should call performOperations conditionally if event is handled
Expand Down Expand Up @@ -638,7 +646,8 @@ void NativeReanimatedModule::initializeFabric(
commitHook_ =
std::make_shared<ReanimatedCommitHook>(propsRegistry_, uiManager_);
#if REACT_NATIVE_MINOR_VERSION >= 73
mountHook_ = std::make_shared<ReanimatedMountHook>(propsRegistry, uiManager_);
mountHook_ =
std::make_shared<ReanimatedMountHook>(propsRegistry_, uiManager_);
#endif
}
#endif // RCT_NEW_ARCH_ENABLED
Expand Down
21 changes: 10 additions & 11 deletions Common/cpp/ReanimatedRuntime/ReanimatedHermesRuntime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,19 @@
#include <hermes/hermes.h>
#endif

#include <hermes/inspector/RuntimeAdapter.h>
#include <hermes/inspector/chrome/Registration.h>

namespace reanimated {

using namespace facebook;
using namespace react;
#if REACT_NATIVE_MINOR_VERSION >= 73
using namespace facebook::hermes::inspector_modern;
#else
using namespace facebook::hermes::inspector;
#endif

#if HERMES_ENABLE_DEBUGGER

class HermesExecutorRuntimeAdapter
: public facebook::hermes::inspector::RuntimeAdapter {
class HermesExecutorRuntimeAdapter : public RuntimeAdapter {
public:
explicit HermesExecutorRuntimeAdapter(
facebook::hermes::HermesRuntime &hermesRuntime,
Expand Down Expand Up @@ -81,11 +82,9 @@ ReanimatedHermesRuntime::ReanimatedHermesRuntime(
auto adapter =
std::make_unique<HermesExecutorRuntimeAdapter>(*runtime_, jsQueue);
#if REACT_NATIVE_MINOR_VERSION >= 71
debugToken_ = facebook::hermes::inspector::chrome::enableDebugging(
std::move(adapter), name);
debugToken_ = chrome::enableDebugging(std::move(adapter), name);
#else
facebook::hermes::inspector::chrome::enableDebugging(
std::move(adapter), name);
chrome::enableDebugging(std::move(adapter), name);
#endif // REACT_NATIVE_MINOR_VERSION
#else
// This is required by iOS, because there is an assertion in the destructor
Expand Down Expand Up @@ -127,9 +126,9 @@ ReanimatedHermesRuntime::~ReanimatedHermesRuntime() {
#if HERMES_ENABLE_DEBUGGER
// We have to disable debugging before the runtime is destroyed.
#if REACT_NATIVE_MINOR_VERSION >= 71
facebook::hermes::inspector::chrome::disableDebugging(debugToken_);
chrome::disableDebugging(debugToken_);
#else
facebook::hermes::inspector::chrome::disableDebugging(*runtime_);
chrome::disableDebugging(*runtime_);
#endif // REACT_NATIVE_MINOR_VERSION
#endif // HERMES_ENABLE_DEBUGGER
}
Expand Down
12 changes: 10 additions & 2 deletions Common/cpp/ReanimatedRuntime/ReanimatedHermesRuntime.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,22 @@
#include <hermes/hermes.h>
#endif

#if REACT_NATIVE_MINOR_VERSION >= 71
#if REACT_NATIVE_MINOR_VERSION >= 73
#include <hermes/inspector-modern/chrome/Registration.h>
#else
#include <hermes/inspector/RuntimeAdapter.h>
#include <hermes/inspector/chrome/Registration.h>
#endif

namespace reanimated {

using namespace facebook;
using namespace react;
#if REACT_NATIVE_MINOR_VERSION >= 73
using namespace facebook::hermes::inspector_modern;
#else
using namespace facebook::hermes::inspector;
#endif

// ReentrancyCheck is copied from React Native
// from ReactCommon/hermes/executor/HermesExecutorFactory.cpp
Expand Down Expand Up @@ -127,7 +135,7 @@ class ReanimatedHermesRuntime
ReanimatedReentrancyCheck reentrancyCheck_;
#if HERMES_ENABLE_DEBUGGER
#if REACT_NATIVE_MINOR_VERSION >= 71
facebook::hermes::inspector::chrome::DebugSessionToken debugToken_;
chrome::DebugSessionToken debugToken_;
#endif // REACT_NATIVE_MINOR_VERSION >= 71
#endif // HERMES_ENABLE_DEBUGGER
};
Expand Down
3 changes: 2 additions & 1 deletion Common/cpp/Tools/SingleInstanceChecker.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

#include <cxxabi.h>

#include <atomic>
#include <iostream>
#include <string>

Expand Down Expand Up @@ -41,7 +42,7 @@ class SingleInstanceChecker {

// A static field will exist separately for every class template.
// This has to be inline for automatic initialization.
inline static volatile int instanceCount_;
inline static std::atomic<int> instanceCount_;
};

template <class T>
Expand Down
5 changes: 3 additions & 2 deletions RNReanimated.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ fabric_flags = fabric_enabled ? '-DRCT_NEW_ARCH_ENABLED' : ''
example_flag = config[:is_reanimated_example_app] ? '-DIS_REANIMATED_EXAMPLE_APP' : ''
version_flag = '-DREANIMATED_VERSION=' + reanimated_package_json["version"]
debug_flag = is_release ? '-DNDEBUG' : ''
ios_min_version = config[:react_native_minor_version] >= 73 ? '10.0' : '9.0'

Pod::Spec.new do |s|

Expand All @@ -30,7 +31,7 @@ Pod::Spec.new do |s|
s.license = "MIT"
# s.license = { :type => "MIT", :file => "FILE_LICENSE" }
s.author = { "author" => "[email protected]" }
s.platforms = { :ios => "9.0", :tvos => "9.0", :osx => "10.14" }
s.platforms = { :ios => ios_min_version, :tvos => "9.0", :osx => "10.14" }
s.source = { :git => "https://github.com/software-mansion/react-native-reanimated.git", :tag => "#{s.version}" }

s.source_files = [
Expand All @@ -45,7 +46,7 @@ Pod::Spec.new do |s|
s.pod_target_xcconfig = {
"USE_HEADERMAP" => "YES",
"DEFINES_MODULE" => "YES",
"HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_TARGET_SRCROOT)\" \"$(PODS_ROOT)/RCT-Folly\" \"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/Headers/Private/React-Core\"",
"HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_TARGET_SRCROOT)\" \"$(PODS_ROOT)/RCT-Folly\" \"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/Headers/Private/React-Core\" \"$(PODS_ROOT)/Headers/Private/Yoga\"",
"FRAMEWORK_SEARCH_PATHS" => "\"${PODS_CONFIGURATION_BUILD_DIR}/React-hermes\"",
"CLANG_CXX_LANGUAGE_STANDARD" => "c++17",
}
Expand Down
8 changes: 6 additions & 2 deletions android/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@ project(Reanimated)
cmake_minimum_required(VERSION 3.8)

set (CMAKE_VERBOSE_MAKEFILE ON)
set (CMAKE_CXX_STANDARD 17)
if(${REACT_NATIVE_MINOR_VERSION} GREATER_EQUAL 73)
set (CMAKE_CXX_STANDARD 20)
else()
set (CMAKE_CXX_STANDARD 17)
endif()

# default CMAKE_CXX_FLAGS: "-g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-protector-all"

Expand All @@ -16,7 +20,7 @@ endif()

string(APPEND CMAKE_CXX_FLAGS " -DREACT_NATIVE_MINOR_VERSION=${REACT_NATIVE_MINOR_VERSION} -DREANIMATED_VERSION=${REANIMATED_VERSION} -DHERMES_ENABLE_DEBUGGER=${HERMES_ENABLE_DEBUGGER}")

string(APPEND CMAKE_CXX_FLAGS " -fexceptions -fno-omit-frame-pointer -frtti -fstack-protector-all -std=c++17 -Wall -Werror")
string(APPEND CMAKE_CXX_FLAGS " -fexceptions -fno-omit-frame-pointer -frtti -fstack-protector-all -std=c++${CMAKE_CXX_STANDARD} -Wall -Werror")

if(${IS_NEW_ARCHITECTURE_ENABLED})
string(APPEND CMAKE_CXX_FLAGS " -DRCT_NEW_ARCH_ENABLED")
Expand Down
3 changes: 3 additions & 0 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ android {
if (REACT_NATIVE_MINOR_VERSION > 68) {
prefab true
prefabPublishing true
buildConfig true
}
}

Expand Down Expand Up @@ -363,6 +364,8 @@ android {
if (REANIMATED_MAJOR_VERSION > 2) {
if (REACT_NATIVE_MINOR_VERSION <= 67) {
srcDirs += "src/reactNativeVersionPatch/messageQueueThread/67"
} else if (REACT_NATIVE_MINOR_VERSION <= 72) {
srcDirs += "src/reactNativeVersionPatch/messageQueueThread/72"
} else {
srcDirs += "src/reactNativeVersionPatch/messageQueueThread/latest"
}
Expand Down
3 changes: 3 additions & 0 deletions android/src/main/cpp/NativeProxy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
#include <react/jni/JMessageQueueThread.h>
#include <react/jni/ReadableNativeArray.h>
#include <react/jni/ReadableNativeMap.h>
#ifdef RCT_NEW_ARCH_ENABLED
#include <react/fabric/Binding.h>
#endif

#include <memory>
#include <string>
Expand Down
1 change: 1 addition & 0 deletions android/src/main/cpp/NativeProxy.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

#ifdef RCT_NEW_ARCH_ENABLED
#include <react/fabric/JFabricUIManager.h>
#include <react/renderer/scheduler/Scheduler.h>
#endif

#include <ReactCommon/CallInvokerHolder.h>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package com.swmansion.reanimated;

import com.facebook.proguard.annotations.DoNotStrip;
import com.swmansion.reanimated.ReanimatedMessageQueueThreadBase;

@DoNotStrip
public class ReanimatedMessageQueueThread extends ReanimatedMessageQueueThreadBase {
@Override
public boolean runOnQueue(Runnable runnable) {
return messageQueueThread.runOnQueue(runnable);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,9 @@ public class ReanimatedMessageQueueThread extends ReanimatedMessageQueueThreadBa
public boolean runOnQueue(Runnable runnable) {
return messageQueueThread.runOnQueue(runnable);
}

@Override
public boolean isIdle() {
return messageQueueThread.isIdle();
}
}
4 changes: 4 additions & 0 deletions apple/LayoutReanimation/REASwizzledUIManager.mm
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,11 @@ - (RCTViewManagerUIBlock)reanimated_uiBlockWithLayoutUpdateForRootView:(RCTRootS
}

RCTUIManager *originalSelf = (RCTUIManager *)self;
#if REACT_NATIVE_MINOR_VERSION >= 73
NSPointerArray *affectedShadowViews = [NSPointerArray weakObjectsPointerArray];
#else
NSHashTable<RCTShadowView *> *affectedShadowViews = [NSHashTable weakObjectsHashTable];
#endif
[rootShadowView layoutWithAffectedShadowViews:affectedShadowViews];

if (!affectedShadowViews.count) {
Expand Down
4 changes: 3 additions & 1 deletion apple/REAModule.mm
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@

#ifdef RCT_NEW_ARCH_ENABLED
#import <React/RCTFabricSurface.h>
#import <React/RCTRuntimeExecutorFromBridge.h>
#import <React/RCTScheduler.h>
#import <React/RCTSurface.h>
#import <React/RCTSurfacePresenter.h>
#import <React/RCTSurfacePresenterBridgeAdapter.h>
#import <React/RCTSurfaceView.h>
#if REACT_NATIVE_MINOR_VERSION < 73
#import <React/RCTRuntimeExecutorFromBridge.h>
#endif
#endif

#ifdef RCT_NEW_ARCH_ENABLED
Expand Down