Skip to content

Instantly share code, notes, and snippets.

@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=""
/>
@Kudo
Kudo / ReactNativeFlipper.patch
Created June 16, 2022 13:12
expo-dev-launcher + flipper
diff --git a/android/app/src/debug/java/com/test/expoexample/ReactNativeFlipper.java b/android/app/src/debug/java/com/test/expoexample/ReactNativeFlipper.java
index 77543f3..d728f62 100644
--- a/android/app/src/debug/java/com/test/expoexample/ReactNativeFlipper.java
+++ b/android/app/src/debug/java/com/test/expoexample/ReactNativeFlipper.java
@@ -10,6 +10,7 @@ import android.content.Context;
import com.facebook.flipper.android.AndroidFlipperClient;
import com.facebook.flipper.android.utils.FlipperUtils;
import com.facebook.flipper.core.FlipperClient;
+import com.facebook.flipper.core.FlipperPlugin;
import com.facebook.flipper.plugins.crashreporter.CrashReporterPlugin;
@Kudo
Kudo / react-native+0.68.0-rc.2.patch
Created March 11, 2022 12:40
react-native use_frameworks! build error fix for 0.68.0-rc.2 https://github.com/facebook/react-native/pull/33409
diff --git a/node_modules/react-native/Libraries/Blob/React-RCTBlob.podspec b/node_modules/react-native/Libraries/Blob/React-RCTBlob.podspec
index 15a46df..068860a 100644
--- a/node_modules/react-native/Libraries/Blob/React-RCTBlob.podspec
+++ b/node_modules/react-native/Libraries/Blob/React-RCTBlob.podspec
@@ -35,7 +35,7 @@ Pod::Spec.new do |s|
s.pod_target_xcconfig = {
"USE_HEADERMAP" => "YES",
"CLANG_CXX_LANGUAGE_STANDARD" => "c++14",
- "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/RCT-Folly\" \"${PODS_ROOT}/Headers/Public/React-Codegen/react/renderer/components\""
+ "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/RCT-Folly\" \"${PODS_ROOT}/Headers/Public/React-Codegen/react/renderer/components\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-Codegen/React_Codegen.framework/Headers\""
@Kudo
Kudo / react-native+0.68.0-rc.2.patch
Created March 9, 2022 14:31
react-native use_frameworks! build error fix for 0.68.0-rc.2
diff --git a/node_modules/react-native/Libraries/Blob/React-RCTBlob.podspec b/node_modules/react-native/Libraries/Blob/React-RCTBlob.podspec
index 15a46df..e879b4e 100644
--- a/node_modules/react-native/Libraries/Blob/React-RCTBlob.podspec
+++ b/node_modules/react-native/Libraries/Blob/React-RCTBlob.podspec
@@ -35,11 +35,11 @@ Pod::Spec.new do |s|
s.pod_target_xcconfig = {
"USE_HEADERMAP" => "YES",
"CLANG_CXX_LANGUAGE_STANDARD" => "c++14",
- "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/RCT-Folly\" \"${PODS_ROOT}/Headers/Public/React-Codegen/react/renderer/components\""
+ "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/RCT-Folly\" \"${PODS_ROOT}/Headers/Public/FBReactNativeSpec/react/renderer/components\""