Skip to content

Instantly share code, notes, and snippets.

@Kudo
Kudo / Expected_output.txt
Last active November 12, 2018 08:31
getline fallback implementations
Test POSIX getline() in system
Success
Test fgets backed getline()
Success
Test fgetln backed getline()
Success
@Kudo
Kudo / diff.patch
Created November 14, 2018 14:50
RNTester depends on AAR react-native
diff --git a/RNTester/android/app/build.gradle b/RNTester/android/app/build.gradle
index f0f5926139..541dde41bd 100644
--- a/RNTester/android/app/build.gradle
+++ b/RNTester/android/app/build.gradle
@@ -133,6 +133,5 @@ dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:27.1.1'
- // Build React Native from source
- implementation project(':ReactAndroid')
@Kudo
Kudo / 56.patch
Last active December 28, 2018 03:31
react-native-cli PR 56 patch
--- util/loadMetroConfig.js.orig 2018-12-27 17:45:19.000000000 +0800
+++ util/loadMetroConfig.js 2018-12-28 11:04:51.000000000 +0800
@@ -49,13 +49,13 @@
'react-native',
...plugins.haste.providesModuleNodeModules,
],
- hasteImplModulePath: require.resolve('react-native/jest/hasteImpl'),
},
serializer: {
getModulesRunBeforeMainModule: () => [
@Kudo
Kudo / jsc.patch
Created January 17, 2019 06:24
React Native Android instrument tests fix
diff --git a/ReactAndroid/libs/BUCK b/ReactAndroid/libs/BUCK
index a360e7e863..e63824a6a4 100644
--- a/ReactAndroid/libs/BUCK
+++ b/ReactAndroid/libs/BUCK
@@ -18,8 +18,10 @@ rn_android_prebuilt_aar(
aar = ":android-jsc-aar",
)
-fb_native.remote_file(
+fb_native.http_archive(
@Kudo
Kudo / Steps_for_WebkitGTK_2_24_2.md
Last active September 5, 2023 10:16
Steps to integrate experimented JSC

Intro

Here are the steps to integrate experimented JavaScriptCore. Hopefully this could solve the JSC crash issue on RN 0.59.

Steps (for RN 0.59)

  1. yarn add 'jsc-android@next'
  2. Modify build.gradle files.
diff --git a/android/app/build.gradle b/android/app/build.gradle
@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\""
@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 / 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 / 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 / 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];
}
}
}