Skip to content

Instantly share code, notes, and snippets.

@Kudo
Kudo / expo-modules-core+2.2.3.patch
Created March 14, 2025 09:07
expo fix for fcxx-modules
diff --git a/node_modules/expo-modules-core/common/cpp/fabric/ExpoViewComponentDescriptor.h b/node_modules/expo-modules-core/common/cpp/fabric/ExpoViewComponentDescriptor.h
index 11073e5..988b389 100644
--- a/node_modules/expo-modules-core/common/cpp/fabric/ExpoViewComponentDescriptor.h
+++ b/node_modules/expo-modules-core/common/cpp/fabric/ExpoViewComponentDescriptor.h
@@ -2,7 +2,7 @@
#pragma once
-#ifdef __cplusplus
+#if defined(__has_feature) && !__has_feature(objc_modules)
@Kudo
Kudo / babel.config.js
Created February 27, 2025 12:48
Expo DOM components for Android 9 support
module.exports = function (api) {
api.cache(true);
return {
presets: [
'babel-preset-expo',
],
plugins: [
['@babel/plugin-transform-class-properties', { loose: true }],
['@babel/plugin-transform-private-methods', { loose: true }],
['@babel/plugin-transform-private-property-in-object', { loose: true }],
@Kudo
Kudo / patch.sh
Created December 9, 2024 15:19
patch to fix react-native #47926
#!/usr/bin/bash
# Add react-native patches
mkdir -p patches
cat > patches/react-native+0.76.3.patch << EOF
diff --git a/node_modules/react-native/Libraries/Components/Keyboard/KeyboardAvoidingView.js b/node_modules/react-native/Libraries/Components/Keyboard/KeyboardAvoidingView.js
index 860118d..141978c 100644
--- a/node_modules/react-native/Libraries/Components/Keyboard/KeyboardAvoidingView.js
+++ b/node_modules/react-native/Libraries/Components/Keyboard/KeyboardAvoidingView.js
@@ -95,7 +95,9 @@ class KeyboardAvoidingView extends React.Component<Props, State> {
@Kudo
Kudo / android+e595dc4a98abafdbbb9eb9979064bb34.patch
Created February 17, 2024 05:38
Customize User-Agent for Expo
diff --git a/android/app/src/main/java/dev/expo/kudo/sdk50/MainApplication.kt b/android/app/src/main/java/dev/expo/kudo/sdk50/MainApplication.kt
index e9a2f7a..fbf9aae 100644
--- a/android/app/src/main/java/dev/expo/kudo/sdk50/MainApplication.kt
+++ b/android/app/src/main/java/dev/expo/kudo/sdk50/MainApplication.kt
@@ -14,10 +14,12 @@ import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load
import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost
import com.facebook.react.defaults.DefaultReactNativeHost
import com.facebook.react.flipper.ReactNativeFlipper
+import com.facebook.react.modules.network.OkHttpClientProvider
import com.facebook.soloader.SoLoader
diff --git a/android/app/build.gradle b/android/app/build.gradle
index 8526646..fcb7627 100644
--- a/android/app/build.gradle
+++ b/android/app/build.gradle
@@ -158,8 +158,6 @@ dependencies {
}
}
- implementation("com.facebook.react:flipper-integration")
-
@Kudo
Kudo / React-Core-umbrella.h
Created August 10, 2023 02:50
React-Core-umbrella.h from react-native 0.72
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#else
#ifndef FOUNDATION_EXPORT
#if defined(__cplusplus)
#define FOUNDATION_EXPORT extern "C"
#else
#define FOUNDATION_EXPORT extern
#endif
#endif
@Kudo
Kudo / example.patch
Created June 15, 2023 13:46
Patch to stripe-react-native for local Expo Go testing
diff --git a/example/app.json b/example/app.json
index b85d133..d0c1de7 100644
--- a/example/app.json
+++ b/example/app.json
@@ -4,6 +4,6 @@
"expo": {
"name": "StripeSdkExample",
"slug": "StripeSdkExample",
- "sdkVersion": "44.0.0"
+ "sdkVersion": "UNVERSIONED"
@Kudo
Kudo / expo+45.0.4.patch
Created August 1, 2022 14:36
nodeCommand troubleshooting
diff --git a/node_modules/expo/android/build.gradle b/node_modules/expo/android/build.gradle
index 256c791..d9ae352 100644
--- a/node_modules/expo/android/build.gradle
+++ b/node_modules/expo/android/build.gradle
@@ -10,14 +10,13 @@ static def versionToNumber(major, minor, patch) {
}
def getRNVersion() {
- def nodeModulesVersion = [
- "node",
@Kudo
Kudo / react-native+0.69.3.patch
Last active July 30, 2022 16:21
Fabric with UIViewPropertyAnimator issue
diff --git a/node_modules/react-native/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm b/node_modules/react-native/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm
index 172020a..d81354e 100644
--- a/node_modules/react-native/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm
+++ b/node_modules/react-native/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm
@@ -163,20 +163,25 @@ using namespace facebook::react;
// View is completely outside the clipRect, so unmount it
[view removeFromSuperview];
}
}
}
@Kudo
Kudo / expo-notifications+0.15.3.patch
Created June 26, 2022 06:53
expo-notifications #17966 fix
diff --git a/node_modules/expo-notifications/android/src/main/AndroidManifest.xml b/node_modules/expo-notifications/android/src/main/AndroidManifest.xml
index 2b2fa5e..411f832 100644
--- a/node_modules/expo-notifications/android/src/main/AndroidManifest.xml
+++ b/node_modules/expo-notifications/android/src/main/AndroidManifest.xml
@@ -34,6 +34,7 @@
android:excludeFromRecents="true"
android:noHistory="true"
android:launchMode="standard"
+ android:taskAffinity=""
/>