Here are the steps to integrate experimented JavaScriptCore. Hopefully this could solve the JSC crash issue on RN 0.59.
yarn add 'jsc-android@next'
- Modify build.gradle files.
diff --git a/android/app/build.gradle b/android/app/build.gradle
Test POSIX getline() in system | |
Success | |
Test fgets backed getline() | |
Success | |
Test fgetln backed getline() | |
Success |
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') |
--- 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: () => [ |
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( |
Here are the steps to integrate experimented JavaScriptCore. Hopefully this could solve the JSC crash issue on RN 0.59.
yarn add 'jsc-android@next'
diff --git a/android/app/build.gradle b/android/app/build.gradle
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\"" |
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\"" |
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; |
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="" | |
/> |
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]; | |
} | |
} | |
} |