Skip to content

Instantly share code, notes, and snippets.

@jzxchiang1
jzxchiang1 / react-native-vision-camera+2.11.2.patch
Created April 11, 2022 01:32
How to get react-native-vision-camera working with v8 reanimated
diff --git a/node_modules/react-native-vision-camera/android/CMakeLists.txt b/node_modules/react-native-vision-camera/android/CMakeLists.txt
index f87ef60..1781b5d 100644
--- a/node_modules/react-native-vision-camera/android/CMakeLists.txt
+++ b/node_modules/react-native-vision-camera/android/CMakeLists.txt
@@ -61,12 +61,14 @@ target_include_directories(
${INCLUDE_JSI_CPP} # only on older RN versions
${INCLUDE_JSIDYNAMIC_CPP} # only on older RN versions
# --- Reanimated ---
+ "${NODE_MODULES_DIR}/react-native-reanimated/Common/cpp/headers/AnimatedSensor"
"${NODE_MODULES_DIR}/react-native-reanimated/Common/cpp/headers/Tools"
@jzxchiang1
jzxchiang1 / react-native-orientation-locker+1.4.0.patch
Created December 6, 2021 02:32
How to get accurate device orientation on iOS even with rotate lock turned on
diff --git a/node_modules/react-native-orientation-locker/iOS/RCTOrientation/Orientation.m b/node_modules/react-native-orientation-locker/iOS/RCTOrientation/Orientation.m
index 6117764..de9eaec 100644
--- a/node_modules/react-native-orientation-locker/iOS/RCTOrientation/Orientation.m
+++ b/node_modules/react-native-orientation-locker/iOS/RCTOrientation/Orientation.m
@@ -8,6 +8,7 @@
#import "Orientation.h"
+#import "RCTSensorOrientationChecker.h"