From c1463622383f4c407c047a384ed3dd7ae528cb3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oskar=20Kwas=CC=81niewski?= Date: Fri, 21 Feb 2025 12:20:56 +0100 Subject: [PATCH 1/2] fix: add difs --- README.md | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 05806cf..944377f 100644 --- a/README.md +++ b/README.md @@ -41,12 +41,12 @@ useThirdPartyJSC=true Open AppDelegate.swift and overwrite `createJSRuntimeFactory` method: -```swift +```diff import React import React_RCTAppDelegate import ReactAppDependencyProvider import UIKit -import RCTRuntime ++import RCTRuntime // AppDelegate code @@ -63,9 +63,9 @@ class ReactNativeDelegate: RCTDefaultReactNativeFactoryDelegate { #endif } - override func createJSRuntimeFactory() -> JSRuntimeFactory { - jsrt_create_jsc_factory() // Use JavaScriptCore runtime - } ++ override func createJSRuntimeFactory() -> JSRuntimeFactory { ++ jsrt_create_jsc_factory() // Use JavaScriptCore runtime ++ } } ``` @@ -73,9 +73,9 @@ class ReactNativeDelegate: RCTDefaultReactNativeFactoryDelegate { Open `MainApplication.java` and overwrite `getJavaScriptExecutorFactory` method: -```java -import io.github.reactnativecommunity.javascriptcore.JSCExecutorFactory -import io.github.reactnativecommunity.javascriptcore.JSCRuntimeFactory +```diff ++import io.github.reactnativecommunity.javascriptcore.JSCExecutorFactory ++import io.github.reactnativecommunity.javascriptcore.JSCRuntimeFactory class MainApplication : Application(), ReactApplication { @@ -94,12 +94,12 @@ class MainApplication : Application(), ReactApplication { override val isNewArchEnabled: Boolean = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED override val isHermesEnabled: Boolean = BuildConfig.IS_HERMES_ENABLED - override fun getJavaScriptExecutorFactory(): JavaScriptExecutorFactory = - JSCExecutorFactory(packageName, AndroidInfoHelpers.getFriendlyDeviceName()) ++ override fun getJavaScriptExecutorFactory(): JavaScriptExecutorFactory = ++ JSCExecutorFactory(packageName, AndroidInfoHelpers.getFriendlyDeviceName()) } - override val reactHost: ReactHost - get() = getDefaultReactHost(applicationContext, reactNativeHost, JSCRuntimeFactory()) ++ override val reactHost: ReactHost ++ get() = getDefaultReactHost(applicationContext, reactNativeHost, JSCRuntimeFactory()) override fun onCreate() { super.onCreate() From e9b2ef6d908b2b737639aee41be9add4f6bf0af6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oskar=20Kwas=CC=81niewski?= Date: Fri, 21 Feb 2025 12:26:22 +0100 Subject: [PATCH 2/2] docs: add special thanks section --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index 944377f..1029b81 100644 --- a/README.md +++ b/README.md @@ -116,6 +116,15 @@ class MainApplication : Application(), ReactApplication { This library is maintained by [Callstack](https://callstack.com/) a Total Software Engineering Consultancy that transforms organizations and teams through transformative apps. +### Special Thanks + +Special thanks to the team who worked on the initial extraction of JavaScriptCore from core react-native: + +- [Riccardo Cipolleschi](https://github.com/cipolleschi) +- [Nicola Corti](https://github.com/cortinico) +- [Kudo Chien](https://github.com/Kudo) +- [Oskar Kwaƛniewski](https://github.com/okwasniewski) + ## License Everything inside this repository is [MIT licensed](./LICENSE).