expo-modules-core 56.0.5 → 56.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/android/build.gradle +2 -2
  3. package/android/src/main/cpp/Exceptions.cpp +0 -3
  4. package/android/src/main/cpp/Exceptions.h +1 -4
  5. package/android/src/main/cpp/ExpoHeader.pch +0 -2
  6. package/android/src/main/cpp/ExpoModulesHostObject.cpp +1 -2
  7. package/android/src/main/cpp/ExpoModulesHostObject.h +1 -3
  8. package/android/src/main/cpp/JNIDeallocator.h +1 -1
  9. package/android/src/main/cpp/JNIFunctionBody.cpp +0 -1
  10. package/android/src/main/cpp/JNIFunctionBody.h +1 -2
  11. package/android/src/main/cpp/JNIInjector.cpp +1 -1
  12. package/android/src/main/cpp/JNIUtils.cpp +1 -1
  13. package/android/src/main/cpp/JNIUtils.h +1 -6
  14. package/android/src/main/cpp/JSIContext.cpp +1 -5
  15. package/android/src/main/cpp/JSIContext.h +1 -6
  16. package/android/src/main/cpp/JSITypeConverter.h +1 -5
  17. package/android/src/main/cpp/JSharedObject.h +1 -1
  18. package/android/src/main/cpp/JavaCallback.cpp +8 -13
  19. package/android/src/main/cpp/JavaCallback.h +1 -7
  20. package/android/src/main/cpp/JavaReferencesCache.cpp +1 -2
  21. package/android/src/main/cpp/JavaReferencesCache.h +1 -4
  22. package/android/src/main/cpp/JavaScriptArrayBuffer.h +1 -4
  23. package/android/src/main/cpp/JavaScriptFunction.h +1 -4
  24. package/android/src/main/cpp/JavaScriptModuleObject.h +1 -5
  25. package/android/src/main/cpp/JavaScriptObject.h +1 -5
  26. package/android/src/main/cpp/JavaScriptRuntime.cpp +0 -1
  27. package/android/src/main/cpp/JavaScriptRuntime.h +1 -2
  28. package/android/src/main/cpp/JavaScriptTypedArray.h +1 -4
  29. package/android/src/main/cpp/JavaScriptValue.h +1 -5
  30. package/android/src/main/cpp/JavaScriptWeakObject.h +1 -5
  31. package/android/src/main/cpp/MethodMetadata.cpp +1 -6
  32. package/android/src/main/cpp/MethodMetadata.h +1 -9
  33. package/android/src/main/cpp/NativeArrayBuffer.h +1 -4
  34. package/android/src/main/cpp/RuntimeHolder.h +1 -2
  35. package/android/src/main/cpp/ThreadSafeJNIGlobalRef.h +1 -1
  36. package/android/src/main/cpp/concepts/jni.h +4 -4
  37. package/android/src/main/cpp/concepts/jni_deref.h +1 -1
  38. package/android/src/main/cpp/concepts/jsi.h +1 -1
  39. package/android/src/main/cpp/decorators/JSClassesDecorator.h +1 -3
  40. package/android/src/main/cpp/decorators/JSConstantsDecorator.cpp +1 -4
  41. package/android/src/main/cpp/decorators/JSConstantsDecorator.h +1 -3
  42. package/android/src/main/cpp/decorators/JSDecorator.h +1 -2
  43. package/android/src/main/cpp/decorators/JSDecoratorsBridgingObject.h +1 -4
  44. package/android/src/main/cpp/decorators/JSFunctionsDecorator.cpp +1 -2
  45. package/android/src/main/cpp/decorators/JSFunctionsDecorator.h +1 -5
  46. package/android/src/main/cpp/decorators/JSObjectDecorator.h +1 -1
  47. package/android/src/main/cpp/decorators/JSPropertiesDecorator.cpp +1 -2
  48. package/android/src/main/cpp/decorators/JSPropertiesDecorator.h +1 -3
  49. package/android/src/main/cpp/fabric/AndroidExpoViewProps.h +1 -1
  50. package/android/src/main/cpp/fabric/AndroidExpoViewState.h +1 -3
  51. package/android/src/main/cpp/fabric/FabricComponentsRegistry.h +1 -1
  52. package/android/src/main/cpp/fabric/NativeStatePropsGetter.h +1 -2
  53. package/android/src/main/cpp/installers/MainRuntimeInstaller.h +1 -2
  54. package/android/src/main/cpp/installers/WorkletRuntimeInstaller.h +1 -2
  55. package/android/src/main/cpp/javaclasses/Collections.h +1 -1
  56. package/android/src/main/cpp/javaclasses/JSRunnable.h +1 -1
  57. package/android/src/main/cpp/types/AnyType.cpp +0 -1
  58. package/android/src/main/cpp/types/AnyType.h +1 -2
  59. package/android/src/main/cpp/types/ExpectedType.h +1 -1
  60. package/android/src/main/cpp/types/FrontendConverter.cpp +1 -1
  61. package/android/src/main/cpp/types/FrontendConverter.h +1 -3
  62. package/android/src/main/cpp/types/FrontendConverterProvider.h +1 -5
  63. package/android/src/main/cpp/types/JNIToJSIConverter.h +13 -16
  64. package/android/src/main/cpp/worklets/Serializable.h +2 -2
  65. package/android/src/main/cpp/worklets/Worklet.h +2 -5
  66. package/android/src/main/cpp/worklets/WorkletJSCallInvoker.h +2 -4
  67. package/android/src/main/cpp/worklets/WorkletNativeRuntime.h +2 -2
  68. package/ios/Core/AppContext.swift +26 -4
  69. package/ios/JS/EXReactSchedulerDispatch.h +28 -0
  70. package/ios/JS/EXReactSchedulerDispatch.mm +19 -0
  71. package/package.json +3 -3
  72. package/prebuilds/output/debug/xcframeworks/ExpoModulesCore.tar.gz +0 -0
  73. package/prebuilds/output/debug/xcframeworks/ExpoModulesWorklets.tar.gz +0 -0
  74. package/prebuilds/output/release/xcframeworks/ExpoModulesCore.tar.gz +0 -0
  75. package/prebuilds/output/release/xcframeworks/ExpoModulesWorklets.tar.gz +0 -0
package/CHANGELOG.md CHANGED
@@ -10,6 +10,12 @@
10
10
 
11
11
  ### 💡 Others
12
12
 
13
+ ## 56.0.6 — 2026-05-11
14
+
15
+ ### 💡 Others
16
+
17
+ - [iOS] `AppContext.setRuntime` now takes the native React `RuntimeScheduler` pointer and a dispatch trampoline alongside the runtime pointer. ([#45636](https://github.com/expo/expo/pull/45636) by [@tsapeta](https://github.com/tsapeta))
18
+
13
19
  ## 56.0.5 — 2026-05-08
14
20
 
15
21
  ### 🐛 Bug fixes
@@ -27,7 +27,7 @@ if (shouldIncludeCompose) {
27
27
  }
28
28
 
29
29
  group = 'host.exp.exponent'
30
- version = '56.0.5'
30
+ version = '56.0.6'
31
31
 
32
32
  def isExpoModulesCoreTests = {
33
33
  Gradle gradle = getGradle()
@@ -94,7 +94,7 @@ android {
94
94
  defaultConfig {
95
95
  consumerProguardFiles 'proguard-rules.pro'
96
96
  versionCode 1
97
- versionName "56.0.5"
97
+ versionName "56.0.6"
98
98
  buildConfigField "String", "EXPO_MODULES_CORE_VERSION", "\"${versionName}\""
99
99
  buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", "true"
100
100
 
@@ -2,9 +2,6 @@
2
2
 
3
3
  #include "Exceptions.h"
4
4
 
5
- #include "JSIContext.h"
6
- #include "JSReferencesCache.h"
7
-
8
5
  namespace jni = facebook::jni;
9
6
 
10
7
  namespace expo {
@@ -2,10 +2,7 @@
2
2
 
3
3
  #pragma once
4
4
 
5
- #include <fbjni/fbjni.h>
6
- #include <jsi/jsi.h>
7
-
8
- #include <optional>
5
+ #include "ExpoHeader.pch"
9
6
 
10
7
  namespace jni = facebook::jni;
11
8
  namespace jsi = facebook::jsi;
@@ -1,11 +1,9 @@
1
1
  #pragma once
2
2
 
3
3
  #include <functional>
4
- #include <map>
5
4
  #include <memory>
6
5
  #include <optional>
7
6
  #include <type_traits>
8
- #include <unistd.h>
9
7
  #include <unordered_map>
10
8
  #include <vector>
11
9
 
@@ -1,10 +1,9 @@
1
1
  // Copyright © 2021-present 650 Industries, Inc. (aka Expo)
2
2
 
3
+ #include "ExpoHeader.pch"
3
4
  #include "ExpoModulesHostObject.h"
4
5
  #include "LazyObject.h"
5
6
 
6
- #include <folly/dynamic.h>
7
- #include <jsi/JSIDynamic.h>
8
7
  #include <react/bridging/LongLivedObject.h>
9
8
 
10
9
  namespace jsi = facebook::jsi;
@@ -2,11 +2,9 @@
2
2
 
3
3
  #pragma once
4
4
 
5
+ #include "ExpoHeader.pch"
5
6
  #include "JSIContext.h"
6
7
 
7
- #include <jsi/jsi.h>
8
-
9
- #include <vector>
10
8
  #import <unordered_map>
11
9
 
12
10
  namespace jsi = facebook::jsi;
@@ -2,7 +2,7 @@
2
2
 
3
3
  #pragma once
4
4
 
5
- #include <fbjni/fbjni.h>
5
+ #include "ExpoHeader.pch"
6
6
 
7
7
  namespace jni = facebook::jni;
8
8
 
@@ -2,7 +2,6 @@
2
2
 
3
3
  #include "JNIFunctionBody.h"
4
4
  #include "Exceptions.h"
5
- #include "JavaReferencesCache.h"
6
5
 
7
6
  namespace jni = facebook::jni;
8
7
  namespace react = facebook::react;
@@ -2,8 +2,7 @@
2
2
 
3
3
  #pragma once
4
4
 
5
- #include <fbjni/fbjni.h>
6
- #include <react/jni/ReadableNativeArray.h>
5
+ #include "ExpoHeader.pch"
7
6
 
8
7
  namespace jni = facebook::jni;
9
8
  namespace react = facebook::react;
@@ -1,5 +1,6 @@
1
1
  // Copyright © 2021-present 650 Industries, Inc. (aka Expo)
2
2
 
3
+ #include "ExpoHeader.pch"
3
4
  #include "RuntimeHolder.h"
4
5
  #include "JSIContext.h"
5
6
  #include "JavaScriptModuleObject.h"
@@ -26,7 +27,6 @@
26
27
  #endif
27
28
 
28
29
  #include <jni.h>
29
- #include <fbjni/fbjni.h>
30
30
 
31
31
  // Install all jni bindings
32
32
  JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void *) {
@@ -1,10 +1,10 @@
1
1
  // Copyright © 2021-present 650 Industries, Inc. (aka Expo)
2
2
 
3
+ #include "ExpoHeader.pch"
3
4
  #include "JNIUtils.h"
4
5
  #include "EventEmitter.h"
5
6
  #include "JSIUtils.h"
6
7
  #include "types/JNIToJSIConverter.h"
7
- #include <jsi/JSIDynamic.h>
8
8
  #include "JSIContext.h"
9
9
  #include "Exceptions.h"
10
10
 
@@ -2,12 +2,7 @@
2
2
 
3
3
  #pragma once
4
4
 
5
- #include <vector>
6
- #include <functional>
7
-
8
- #include <fbjni/fbjni.h>
9
- #include <jsi/jsi.h>
10
- #include <react/jni/ReadableNativeMap.h>
5
+ #include "ExpoHeader.pch"
11
6
 
12
7
  #include "JSIContext.h"
13
8
  #include "JavaScriptObject.h"
@@ -1,21 +1,17 @@
1
1
  // Copyright © 2021-present 650 Industries, Inc. (aka Expo)
2
2
 
3
+ #include "ExpoHeader.pch"
3
4
  #include "JSIContext.h"
4
5
  #include "Exceptions.h"
5
- #include "ExpoModulesHostObject.h"
6
6
  #include "JavaReferencesCache.h"
7
7
  #include "JSReferencesCache.h"
8
8
  #include "JSIUtils.h"
9
9
  #include "SharedObject.h"
10
- #include "SharedRef.h"
11
- #include "NativeModule.h"
12
10
  #include "decorators/JSDecoratorsBridgingObject.h"
13
11
  #include "decorators/JSClassesDecorator.h"
14
12
 
15
13
  #include <fbjni/detail/Meta.h>
16
- #include <fbjni/fbjni.h>
17
14
 
18
- #include <memory>
19
15
  #include <shared_mutex>
20
16
 
21
17
  namespace jni = facebook::jni;
@@ -2,6 +2,7 @@
2
2
 
3
3
  #pragma once
4
4
 
5
+ #include "ExpoHeader.pch"
5
6
  #include "JavaScriptRuntime.h"
6
7
  #include "JavaScriptModuleObject.h"
7
8
  #include "JavaScriptValue.h"
@@ -12,8 +13,6 @@
12
13
  #include "ThreadSafeJNIGlobalRef.h"
13
14
  #include "javaclasses/JSRunnable.h"
14
15
 
15
- #include <fbjni/fbjni.h>
16
- #include <jsi/jsi.h>
17
16
  #include <ReactCommon/CallInvokerHolder.h>
18
17
  #include <ReactCommon/CallInvoker.h>
19
18
 
@@ -24,10 +23,6 @@
24
23
 
25
24
  #endif
26
25
 
27
- #include <ReactCommon/NativeMethodCallInvokerHolder.h>
28
-
29
- #include <memory>
30
-
31
26
  namespace jni = facebook::jni;
32
27
  namespace jsi = facebook::jsi;
33
28
  namespace react = facebook::react;
@@ -2,13 +2,9 @@
2
2
 
3
3
  #pragma once
4
4
 
5
+ #include "ExpoHeader.pch"
5
6
  #include "JSIObjectWrapper.h"
6
7
 
7
- #include <fbjni/fbjni.h>
8
- #include <jsi/jsi.h>
9
-
10
- #include <type_traits>
11
-
12
8
  namespace jni = facebook::jni;
13
9
  namespace jsi = facebook::jsi;
14
10
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  #pragma once
4
4
 
5
- #include <fbjni/fbjni.h>
5
+ #include "ExpoHeader.pch"
6
6
 
7
7
  namespace jni = facebook::jni;
8
8
 
@@ -1,20 +1,11 @@
1
1
  // Copyright © 2021-present 650 Industries, Inc. (aka Expo)
2
2
 
3
+ #include "ExpoHeader.pch"
3
4
  #include "JavaCallback.h"
4
5
  #include "JSIContext.h"
5
6
  #include "types/JNIToJSIConverter.h"
6
7
  #include "Exceptions.h"
7
8
 
8
- #include "JSIUtils.h"
9
- #include "JNIUtils.h"
10
-
11
- #include <fbjni/fbjni.h>
12
- #include <fbjni/fbjni.h>
13
- #include <folly/dynamic.h>
14
- #include <jsi/JSIDynamic.h>
15
-
16
- #include <functional>
17
-
18
9
  namespace expo {
19
10
 
20
11
  JavaCallback::CallbackContext::CallbackContext(
@@ -60,7 +51,6 @@ void JavaCallback::registerNatives() {
60
51
  });
61
52
  }
62
53
 
63
-
64
54
  jni::local_ref<JavaCallback::javaobject> JavaCallback::newInstance(
65
55
  JSIContext *jsiContext,
66
56
  std::shared_ptr<CallbackContext> callbackContext
@@ -170,7 +160,11 @@ void JavaCallback::invokeFloat(float result) {
170
160
  }
171
161
 
172
162
  void JavaCallback::invokeString(jni::alias_ref<jstring> result) {
173
- invokeJSFunction(result->toStdString());
163
+ JNIEnv *env = jni::Environment::current();
164
+ const char *rawValue = env->GetStringUTFChars(result.get(), nullptr);
165
+ std::string parsedResult = rawValue;
166
+ env->ReleaseStringUTFChars(result.get(), rawValue);
167
+ invokeJSFunction(parsedResult);
174
168
  }
175
169
 
176
170
  void JavaCallback::invokeCollection(jni::alias_ref<jni::JCollection<jobject>> result) {
@@ -198,7 +192,8 @@ void JavaCallback::invokeSharedObject(jni::alias_ref<JSharedObject::javaobject>
198
192
  invokeJSFunction(jni::make_global(result));
199
193
  }
200
194
 
201
- void JavaCallback::invokeJavaScriptArrayBuffer(jni::alias_ref<JavaScriptArrayBuffer::javaobject> result) {
195
+ void JavaCallback::invokeJavaScriptArrayBuffer(
196
+ jni::alias_ref<JavaScriptArrayBuffer::javaobject> result) {
202
197
  invokeJSFunction(jni::make_global(result));
203
198
  }
204
199
 
@@ -2,18 +2,12 @@
2
2
 
3
3
  #pragma once
4
4
 
5
+ #include "ExpoHeader.pch"
5
6
  #include "JNIDeallocator.h"
6
7
  #include "JSharedObject.h"
7
8
  #include "JavaScriptArrayBuffer.h"
8
9
  #include "NativeArrayBuffer.h"
9
10
 
10
- #include <jsi/jsi.h>
11
- #include <fbjni/fbjni.h>
12
- #include <folly/dynamic.h>
13
- #include <variant>
14
-
15
- #include <react/jni/WritableNativeArray.h>
16
- #include <react/jni/WritableNativeMap.h>
17
11
  #include <fbjni/detail/CoreClasses.h>
18
12
  #include <ReactCommon/CallInvoker.h>
19
13
  #include <react/bridging/LongLivedObject.h>
@@ -1,9 +1,8 @@
1
1
  // Copyright © 2021-present 650 Industries, Inc. (aka Expo)
2
2
 
3
+ #include "ExpoHeader.pch"
3
4
  #include "JavaReferencesCache.h"
4
5
 
5
- #include <vector>
6
-
7
6
  namespace expo {
8
7
 
9
8
  JCache::JCache(JNIEnv *env) {
@@ -2,10 +2,7 @@
2
2
 
3
3
  #pragma once
4
4
 
5
- #include <fbjni/fbjni.h>
6
-
7
- #include <memory>
8
- #include <unordered_map>
5
+ #include "ExpoHeader.pch"
9
6
 
10
7
  namespace jni = facebook::jni;
11
8
 
@@ -1,13 +1,10 @@
1
1
  #pragma once
2
2
 
3
+ #include "ExpoHeader.pch"
3
4
  #include "JNIDeallocator.h"
4
5
  #include "JavaScriptRuntime.h"
5
6
 
6
7
  #include <fbjni/ByteBuffer.h>
7
- #include <fbjni/fbjni.h>
8
- #include <jsi/jsi.h>
9
-
10
- #include <memory>
11
8
 
12
9
  namespace expo {
13
10
 
@@ -2,13 +2,11 @@
2
2
 
3
3
  #pragma once
4
4
 
5
+ #include "ExpoHeader.pch"
5
6
  #include "JSIObjectWrapper.h"
6
7
  #include "JavaScriptRuntime.h"
7
8
  #include "types/ExpectedType.h"
8
9
 
9
- #include <fbjni/fbjni.h>
10
- #include <jsi/jsi.h>
11
-
12
10
  namespace jni = facebook::jni;
13
11
  namespace jsi = facebook::jsi;
14
12
 
@@ -40,7 +38,6 @@ public:
40
38
 
41
39
  std::shared_ptr<jsi::Function> get() override;
42
40
 
43
-
44
41
  private:
45
42
  friend HybridBase;
46
43
 
@@ -2,11 +2,7 @@
2
2
 
3
3
  #pragma once
4
4
 
5
- #include <fbjni/fbjni.h>
6
- #include <jsi/jsi.h>
7
-
8
- #include <vector>
9
- #include <memory>
5
+ #include "ExpoHeader.pch"
10
6
 
11
7
  #include "decorators/JSDecorator.h"
12
8
 
@@ -2,6 +2,7 @@
2
2
 
3
3
  #pragma once
4
4
 
5
+ #include "ExpoHeader.pch"
5
6
  #include "JSIObjectWrapper.h"
6
7
  #include "JSITypeConverter.h"
7
8
  #include "JavaScriptRuntime.h"
@@ -9,11 +10,6 @@
9
10
  #include "JNIDeallocator.h"
10
11
  #include "JSIUtils.h"
11
12
 
12
- #include <fbjni/fbjni.h>
13
- #include <jsi/jsi.h>
14
-
15
- #include <memory>
16
-
17
13
  namespace jni = facebook::jni;
18
14
  namespace jsi = facebook::jsi;
19
15
 
@@ -5,7 +5,6 @@
5
5
  #include "JavaScriptObject.h"
6
6
  #include "Exceptions.h"
7
7
  #include "JSIContext.h"
8
- #include "JSIUtils.h"
9
8
 
10
9
  namespace jsi = facebook::jsi;
11
10
 
@@ -2,10 +2,9 @@
2
2
 
3
3
  #pragma once
4
4
 
5
+ #include "ExpoHeader.pch"
5
6
  #include "JNIDeallocator.h"
6
7
 
7
- #include <jsi/jsi.h>
8
- #include <fbjni/fbjni.h>
9
8
  #include <ReactCommon/CallInvoker.h>
10
9
 
11
10
  namespace jsi = facebook::jsi;
@@ -1,13 +1,10 @@
1
1
  #pragma once
2
2
 
3
+ #include "ExpoHeader.pch"
3
4
  #include "TypedArray.h"
4
5
  #include "JavaScriptObject.h"
5
6
 
6
- #include <fbjni/fbjni.h>
7
7
  #include <fbjni/ByteBuffer.h>
8
- #include <jsi/jsi.h>
9
-
10
- #include <memory>
11
8
 
12
9
  namespace expo {
13
10
 
@@ -2,16 +2,12 @@
2
2
 
3
3
  #pragma once
4
4
 
5
+ #include "ExpoHeader.pch"
5
6
  #include "JSIObjectWrapper.h"
6
7
  #include "JavaScriptTypedArray.h"
7
8
  #include "JavaScriptArrayBuffer.h"
8
9
  #include "JNIDeallocator.h"
9
10
 
10
- #include <fbjni/fbjni.h>
11
- #include <jsi/jsi.h>
12
-
13
- #include <memory>
14
-
15
11
  namespace jni = facebook::jni;
16
12
  namespace jsi = facebook::jsi;
17
13
 
@@ -2,14 +2,10 @@
2
2
 
3
3
  #pragma once
4
4
 
5
+ #include "ExpoHeader.pch"
5
6
  #include "JNIDeallocator.h"
6
7
  #include "JavaScriptObject.h"
7
8
 
8
- #include <fbjni/fbjni.h>
9
- #include <jsi/jsi.h>
10
-
11
- #include <memory>
12
-
13
9
  namespace jni = facebook::jni;
14
10
  namespace jsi = facebook::jsi;
15
11
 
@@ -1,8 +1,6 @@
1
+ #include "ExpoHeader.pch"
1
2
  #include "MethodMetadata.h"
2
3
  #include "JSIContext.h"
3
- #include "JavaScriptValue.h"
4
- #include "JavaScriptObject.h"
5
- #include "JavaScriptTypedArray.h"
6
4
  #include "JavaReferencesCache.h"
7
5
  #include "Exceptions.h"
8
6
  #include "JavaCallback.h"
@@ -10,9 +8,6 @@
10
8
  #include "JSReferencesCache.h"
11
9
 
12
10
  #include <utility>
13
- #include <functional>
14
- #include <unistd.h>
15
- #include <optional>
16
11
 
17
12
  #include <react/bridging/LongLivedObject.h>
18
13
 
@@ -2,20 +2,12 @@
2
2
 
3
3
  #pragma once
4
4
 
5
+ #include "ExpoHeader.pch"
5
6
  #include "types/CppType.h"
6
7
  #include "types/ExpectedType.h"
7
8
  #include "types/AnyType.h"
8
9
  #include "types/ReturnType.h"
9
10
 
10
- #include <jsi/jsi.h>
11
- #include <fbjni/fbjni.h>
12
- #include <ReactCommon/TurboModuleUtils.h>
13
- #include <react/jni/ReadableNativeArray.h>
14
- #include <memory>
15
- #include <vector>
16
- #include <folly/dynamic.h>
17
- #include <jsi/JSIDynamic.h>
18
-
19
11
  namespace jni = facebook::jni;
20
12
  namespace jsi = facebook::jsi;
21
13
  namespace react = facebook::react;
@@ -1,16 +1,13 @@
1
1
  #pragma once
2
2
 
3
+ #include "ExpoHeader.pch"
3
4
  #include "JNIDeallocator.h"
4
5
  #include "JSIContext.h"
5
6
 
6
7
  #include <fbjni/ByteBuffer.h>
7
- #include <fbjni/fbjni.h>
8
- #include <jsi/jsi.h>
9
8
 
10
9
  #include "TypedArray.h"
11
10
 
12
- #include <memory>
13
-
14
11
  namespace expo {
15
12
 
16
13
  class JavaScriptRuntime;
@@ -2,8 +2,7 @@
2
2
 
3
3
  #pragma once
4
4
 
5
- #include <fbjni/fbjni.h>
6
- #include <jsi/jsi.h>
5
+ #include "ExpoHeader.pch"
7
6
 
8
7
  #include <ReactCommon/CallInvokerHolder.h>
9
8
  #include <ReactCommon/CallInvoker.h>
@@ -2,7 +2,7 @@
2
2
 
3
3
  #pragma once
4
4
 
5
- #include <fbjni/fbjni.h>
5
+ #include "ExpoHeader.pch"
6
6
  #include <android/log.h>
7
7
 
8
8
  namespace jni = facebook::jni;
@@ -2,8 +2,8 @@
2
2
 
3
3
  #pragma once
4
4
 
5
+ #include "../ExpoHeader.pch"
5
6
  #include <concepts>
6
- #include <fbjni/fbjni.h>
7
7
  #include "jni_deref.h"
8
8
 
9
9
  namespace jni = facebook::jni;
@@ -13,9 +13,6 @@ namespace expo {
13
13
  template<typename T>
14
14
  concept HasCthis = requires(T &t) { t->cthis(); };
15
15
 
16
- template<typename T>
17
- concept HasToStdString = requires(T &t) { t->toStdString(); };
18
-
19
16
  template<typename T>
20
17
  concept HasValue = requires(T &t) { t->value(); };
21
18
 
@@ -25,6 +22,9 @@ concept HasGetRegion = requires(T &t, jsize s) { t->getRegion(s, s); };
25
22
  template<typename T>
26
23
  concept IsJBoolean = std::is_same_v<jni_deref_t<T>, jni::JBoolean>;
27
24
 
25
+ template<typename T>
26
+ concept IsJString = std::is_same_v<jni_deref_t<T>, jni::JString>;
27
+
28
28
  template<typename T>
29
29
  concept JniRef =
30
30
  std::is_same_v<T, jni::local_ref<jni_deref_t<T>>> ||
@@ -2,8 +2,8 @@
2
2
 
3
3
  #pragma once
4
4
 
5
+ #include "../ExpoHeader.pch"
5
6
  #include <concepts>
6
- #include <fbjni/fbjni.h>
7
7
 
8
8
  namespace jni = facebook::jni;
9
9
 
@@ -2,8 +2,8 @@
2
2
 
3
3
  #pragma once
4
4
 
5
+ #include "../ExpoHeader.pch"
5
6
  #include <concepts>
6
- #include <jsi/jsi.h>
7
7
 
8
8
  namespace jsi = facebook::jsi;
9
9
 
@@ -2,9 +2,7 @@
2
2
 
3
3
  #pragma once
4
4
 
5
- #include <fbjni/fbjni.h>
6
-
7
- #include <map>
5
+ #include "../ExpoHeader.pch"
8
6
 
9
7
  #include "JSDecorator.h"
10
8
  #include "../MethodMetadata.h"
@@ -1,15 +1,12 @@
1
1
  // Copyright © 2021-present 650 Industries, Inc. (aka Expo)
2
2
 
3
+ #include "../ExpoHeader.pch"
3
4
  #include "JSConstantsDecorator.h"
4
5
  #include "../JavaScriptObject.h"
5
6
  #include "JSIUtils.h"
6
- #include "JSFunctionsDecorator.h"
7
7
  #include "../JSIContext.h"
8
8
  #include "../types/JNIToJSIConverter.h"
9
9
 
10
- #include <jsi/jsi.h>
11
- #include <jsi/JSIDynamic.h>
12
-
13
10
  namespace jsi = facebook::jsi;
14
11
 
15
12
  namespace expo {
@@ -2,9 +2,7 @@
2
2
 
3
3
  #pragma once
4
4
 
5
- #include <fbjni/fbjni.h>
6
- #include <react/jni/ReadableNativeMap.h>
7
- #include <folly/dynamic.h>
5
+ #include "../ExpoHeader.pch"
8
6
 
9
7
  #include "JSDecorator.h"
10
8
  #include "../JNIFunctionBody.h"
@@ -2,8 +2,7 @@
2
2
 
3
3
  #pragma once
4
4
 
5
- #include <fbjni/fbjni.h>
6
- #include <jsi/jsi.h>
5
+ #include "../ExpoHeader.pch"
7
6
 
8
7
  namespace jni = facebook::jni;
9
8
  namespace jsi = facebook::jsi;
@@ -2,12 +2,9 @@
2
2
 
3
3
  #pragma once
4
4
 
5
- #include <fbjni/fbjni.h>
6
-
7
- #include <vector>
5
+ #include "../ExpoHeader.pch"
8
6
 
9
7
  #include "JSDecorator.h"
10
- #include "../MethodMetadata.h"
11
8
  #include "../JNIFunctionBody.h"
12
9
  #include "../types/ExpectedType.h"
13
10
 
@@ -1,10 +1,9 @@
1
1
  // Copyright © 2021-present 650 Industries, Inc. (aka Expo)
2
2
 
3
+ #include "../ExpoHeader.pch"
3
4
  #include "JSFunctionsDecorator.h"
4
5
  #include "JSIUtils.h"
5
6
 
6
- #include <jsi/jsi.h>
7
-
8
7
  namespace jsi = facebook::jsi;
9
8
 
10
9
  namespace expo {
@@ -2,11 +2,7 @@
2
2
 
3
3
  #pragma once
4
4
 
5
- #include <fbjni/fbjni.h>
6
- #include <jsi/jsi.h>
7
-
8
- #include <unordered_map>
9
- #include <memory>
5
+ #include "../ExpoHeader.pch"
10
6
 
11
7
  #include "JSDecorator.h"
12
8
  #include "../MethodMetadata.h"
@@ -2,7 +2,7 @@
2
2
 
3
3
  #pragma once
4
4
 
5
- #include <fbjni/fbjni.h>
5
+ #include "../ExpoHeader.pch"
6
6
 
7
7
  #include "JSDecorator.h"
8
8
 
@@ -1,12 +1,11 @@
1
1
  // Copyright © 2021-present 650 Industries, Inc. (aka Expo)
2
2
 
3
+ #include "../ExpoHeader.pch"
3
4
  #include "JSPropertiesDecorator.h"
4
5
  #include "../JavaScriptObject.h"
5
6
  #include "JSIUtils.h"
6
7
  #include "JSFunctionsDecorator.h"
7
8
 
8
- #include <jsi/jsi.h>
9
-
10
9
  namespace jsi = facebook::jsi;
11
10
 
12
11
  namespace expo {
@@ -1,8 +1,6 @@
1
1
  // Copyright © 2021-present 650 Industries, Inc. (aka Expo)
2
2
 
3
- #include <fbjni/fbjni.h>
4
-
5
- #include <unordered_map>
3
+ #include "../ExpoHeader.pch"
6
4
 
7
5
  #include "../MethodMetadata.h"
8
6
  #include "../JNIFunctionBody.h"
@@ -1,8 +1,8 @@
1
1
  #pragma once
2
2
 
3
+ #include "../ExpoHeader.pch"
3
4
  #include "ExpoViewProps.h"
4
5
 
5
- #include <fbjni/fbjni.h>
6
6
  #include <react/renderer/core/RawValue.h>
7
7
 
8
8
  namespace react = facebook::react;
@@ -1,8 +1,6 @@
1
+ #include "../ExpoHeader.pch"
1
2
  #include "ExpoViewState.h"
2
3
 
3
- #include "AndroidExpoViewProps.h"
4
- #include <fbjni/fbjni.h>
5
- #include <folly/dynamic.h>
6
4
  #include <react/renderer/mapbuffer/MapBuffer.h>
7
5
  #include <react/renderer/mapbuffer/MapBufferBuilder.h>
8
6
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  #pragma once
4
4
 
5
- #include <fbjni/fbjni.h>
5
+ #include "../ExpoHeader.pch"
6
6
  #include <CoreComponentsRegistry.h>
7
7
  #include <react/renderer/componentregistry/ComponentDescriptorProvider.h>
8
8
 
@@ -1,7 +1,6 @@
1
1
  #pragma once
2
2
 
3
- #include <fbjni/fbjni.h>
4
- #include <react/fabric/CoreComponentsRegistry.h>
3
+ #include "../ExpoHeader.pch"
5
4
  #include <react/fabric/StateWrapperImpl.h>
6
5
 
7
6
  namespace jni = facebook::jni;
@@ -1,10 +1,9 @@
1
1
  #pragma once
2
2
 
3
+ #include "../ExpoHeader.pch"
3
4
  #include "../JSIContext.h"
4
- #include <fbjni/fbjni.h>
5
5
  #include <ReactCommon/CallInvokerHolder.h>
6
6
  #include <ReactCommon/CallInvoker.h>
7
- #include "SharedObject.h"
8
7
 
9
8
  #if IS_NEW_ARCHITECTURE_ENABLED
10
9
 
@@ -1,9 +1,8 @@
1
1
  #pragma once
2
2
 
3
+ #include "../ExpoHeader.pch"
3
4
  #include "MainRuntimeInstaller.h"
4
5
 
5
- #include <fbjni/fbjni.h>
6
-
7
6
  namespace jni = facebook::jni;
8
7
 
9
8
  namespace expo {
@@ -1,6 +1,6 @@
1
1
  #pragma once
2
2
 
3
- #include <fbjni/fbjni.h>
3
+ #include "../ExpoHeader.pch"
4
4
 
5
5
  namespace jni = facebook::jni;
6
6
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  #pragma once
4
4
 
5
- #include <fbjni/fbjni.h>
5
+ #include "../ExpoHeader.pch"
6
6
 
7
7
  namespace jni = facebook::jni;
8
8
 
@@ -2,7 +2,6 @@
2
2
 
3
3
  #include "AnyType.h"
4
4
  #include "FrontendConverterProvider.h"
5
- #include "../JSIContext.h"
6
5
 
7
6
  namespace expo {
8
7
  AnyType::AnyType(
@@ -2,11 +2,10 @@
2
2
 
3
3
  #pragma once
4
4
 
5
+ #include "../ExpoHeader.pch"
5
6
  #include "ExpectedType.h"
6
7
  #include "FrontendConverter.h"
7
8
 
8
- #include <fbjni/fbjni.h>
9
-
10
9
  namespace jni = facebook::jni;
11
10
 
12
11
  namespace expo {
@@ -2,8 +2,8 @@
2
2
 
3
3
  #pragma once
4
4
 
5
+ #include "../ExpoHeader.pch"
5
6
  #include "CppType.h"
6
- #include <fbjni/fbjni.h>
7
7
 
8
8
  namespace jni = facebook::jni;
9
9
 
@@ -1,5 +1,6 @@
1
1
  // Copyright © 2021-present 650 Industries, Inc. (aka Expo)
2
2
 
3
+ #include "../ExpoHeader.pch"
3
4
  #include "FrontendConverter.h"
4
5
  #include "ExpectedType.h"
5
6
  #include "FrontendConverterProvider.h"
@@ -17,7 +18,6 @@
17
18
 
18
19
  #include "react/jni/ReadableNativeMap.h"
19
20
  #include "react/jni/ReadableNativeArray.h"
20
- #include <jsi/JSIDynamic.h>
21
21
 
22
22
  #include <utility>
23
23
  #include <algorithm>
@@ -2,11 +2,9 @@
2
2
 
3
3
  #pragma once
4
4
 
5
+ #include "../ExpoHeader.pch"
5
6
  #include "CppType.h"
6
7
 
7
- #include <jsi/jsi.h>
8
- #include <fbjni/fbjni.h>
9
-
10
8
  #if WORKLETS_ENABLED
11
9
 
12
10
  #include <worklets/SharedItems/Synchronizable.h>
@@ -2,15 +2,11 @@
2
2
 
3
3
  #pragma once
4
4
 
5
+ #include "../ExpoHeader.pch"
5
6
  #include "CppType.h"
6
7
  #include "FrontendConverter.h"
7
8
  #include "ExpectedType.h"
8
9
 
9
- #include <fbjni/fbjni.h>
10
-
11
- #include <memory>
12
- #include <unordered_map>
13
-
14
10
  namespace jni = facebook::jni;
15
11
 
16
12
  namespace expo {
@@ -2,11 +2,11 @@
2
2
 
3
3
  #pragma once
4
4
 
5
+ #include "../ExpoHeader.pch"
5
6
  #include "../JSIContext.h"
6
7
  #include "../JSharedObject.h"
7
8
  #include "../JNIUtils.h"
8
9
  #include "ObjectDeallocator.h"
9
- #include "../javaclasses/Collections.h"
10
10
  #include "../JavaScriptArrayBuffer.h"
11
11
  #include "../NativeArrayBuffer.h"
12
12
  #include "../concepts/jni_deref.h"
@@ -14,17 +14,8 @@
14
14
  #include "../concepts/jsi.h"
15
15
  #include "ReturnType.h"
16
16
 
17
- #include <fbjni/fbjni.h>
18
- #include <jsi/jsi.h>
19
- #include <optional>
20
17
  #include <concepts>
21
18
 
22
- #include <react/jni/ReadableNativeMap.h>
23
- #include <react/jni/ReadableNativeArray.h>
24
- #include <react/jni/WritableNativeArray.h>
25
- #include <react/jni/WritableNativeMap.h>
26
- #include <jsi/JSIDynamic.h>
27
-
28
19
  namespace jni = facebook::jni;
29
20
  namespace jsi = facebook::jsi;
30
21
  namespace react = facebook::react;
@@ -63,11 +54,17 @@ struct RawArray {
63
54
  };
64
55
 
65
56
  template<typename T>
66
- inline auto unwrapJNIRef(T &&value) {
57
+ inline auto unwrapJNIRef(
58
+ JNIEnv *env,
59
+ T &&value
60
+ ) {
67
61
  if constexpr (HasCthis<T>) {
68
62
  return value->cthis();
69
- } else if constexpr (HasToStdString<T>) {
70
- return value->toStdString();
63
+ } else if constexpr (IsJString<T>) {
64
+ const char *rawValue = env->GetStringUTFChars(value.get(), nullptr);
65
+ std::string result = rawValue;
66
+ env->ReleaseStringUTFChars(value.get(), rawValue);
67
+ return result;
71
68
  } else if constexpr (IsJBoolean<T>) {
72
69
  return static_cast<bool>(value->value());
73
70
  } else if constexpr (HasValue<T>) {
@@ -287,13 +284,13 @@ concept SimpleConversion = requires(JNIEnv *env, jsi::Runtime &rt, T value) {
287
284
 
288
285
  template<typename T>
289
286
  jsi::Value convertToJS(JNIEnv *env, jsi::Runtime &rt, T &&value) {
290
- using UnwrappedType = decltype(unwrapJNIRef(std::declval<T>()));
287
+ using UnwrappedType = decltype(unwrapJNIRef(env, std::declval<T>()));
291
288
  using Converter = JNIToJSIConverter<UnwrappedType>;
292
289
 
293
290
  if constexpr (SimpleConversion<Converter, UnwrappedType>) {
294
- return Converter::convert(env, rt, unwrapJNIRef(std::forward<T>(value)));
291
+ return Converter::convert(env, rt, unwrapJNIRef(env, std::forward<T>(value)));
295
292
  } else {
296
- return Converter::convert(env, rt, unwrapJNIRef(value), value);
293
+ return Converter::convert(env, rt, unwrapJNIRef(env, value), value);
297
294
  }
298
295
  }
299
296
 
@@ -1,12 +1,12 @@
1
1
  #pragma once
2
2
 
3
+ #include "../ExpoHeader.pch"
4
+
3
5
  #if WORKLETS_ENABLED
4
6
 
5
7
  #include "../JSIContext.h"
6
8
  #include "../JNIDeallocator.h"
7
- #include "WorkletNativeRuntime.h"
8
9
 
9
- #include <fbjni/fbjni.h>
10
10
  #include <worklets/SharedItems/Serializable.h>
11
11
 
12
12
  namespace jni = facebook::jni;
@@ -1,15 +1,12 @@
1
1
  #pragma once
2
2
 
3
+ #include "../ExpoHeader.pch"
4
+
3
5
  #if WORKLETS_ENABLED
4
6
 
5
- #include "../JSIContext.h"
6
- #include "../JNIDeallocator.h"
7
7
  #include "WorkletNativeRuntime.h"
8
8
  #include "Serializable.h"
9
9
 
10
- #include <fbjni/fbjni.h>
11
- #include <worklets/SharedItems/Serializable.h>
12
-
13
10
  namespace jni = facebook::jni;
14
11
 
15
12
  namespace expo {
@@ -1,15 +1,13 @@
1
1
  #pragma once
2
2
 
3
+ #include "../ExpoHeader.pch"
4
+
3
5
  #if WORKLETS_ENABLED
4
6
 
5
7
  #include <ReactCommon/CallInvoker.h>
6
- #include <ReactCommon/RuntimeExecutor.h>
7
8
 
8
9
  #include <worklets/WorkletRuntime/WorkletRuntime.h>
9
10
 
10
- #include <memory>
11
-
12
-
13
11
  namespace jsi = facebook::jsi;
14
12
  namespace react = facebook::react;
15
13
 
@@ -1,13 +1,13 @@
1
1
  #pragma once
2
2
 
3
+ #include "../ExpoHeader.pch"
4
+
3
5
  #if WORKLETS_ENABLED
4
6
 
5
7
  #include <worklets/WorkletRuntime/WorkletRuntime.h>
6
8
 
7
9
  #endif
8
10
 
9
- #include <fbjni/fbjni.h>
10
-
11
11
  namespace jni = facebook::jni;
12
12
 
13
13
  namespace expo {
@@ -429,12 +429,34 @@ public final class AppContext: NSObject, EXAppContextProtocol, @unchecked Sendab
429
429
  // MARK: - Runtime
430
430
 
431
431
  /**
432
- Sets the JavaScript runtime from a raw pointer to a `facebook::jsi::Runtime` instance.
433
- Called from ObjC++ (e.g. `ExpoReactNativeFactory`) when React Native initializes the runtime.
432
+ Sets the JavaScript runtime from raw pointers. Called by `ExpoReactNativeFactory`
433
+ when React Native initializes the runtime. When `scheduler` and `dispatch`
434
+ are both provided, `JavaScriptRuntime.schedule(...)` / `.execute(...)` dispatch
435
+ onto the JS thread through them. When either is `nil`, the runtime falls back
436
+ to a synchronous no-op scheduler — callers can detect this via
437
+ `JavaScriptRuntime.supportsAsyncScheduling`.
438
+
439
+ `dispatch` is a raw pointer to a C function with signature
440
+ `void (*)(void *scheduler, int priority, void (^callback)())` — cast back
441
+ to the typed pointer inside `ExpoModulesJSI`. It's typed as `UnsafeRawPointer`
442
+ here rather than `@convention(c)` so the symbol can cross the Objective-C
443
+ bridge without needing a Swift-typed entry point.
434
444
  */
435
445
  @objc
436
- public func setRuntime(_ runtimePointer: UnsafeMutableRawPointer) {
437
- _runtime = ExpoRuntime(unsafePointer: runtimePointer)
446
+ public func setRuntime(
447
+ _ runtimePointer: UnsafeMutableRawPointer,
448
+ scheduler: UnsafeMutableRawPointer?,
449
+ dispatch: UnsafeRawPointer?
450
+ ) {
451
+ if let scheduler, let dispatch {
452
+ _runtime = ExpoRuntime(
453
+ unsafePointer: runtimePointer,
454
+ scheduler: scheduler,
455
+ dispatch: dispatch
456
+ )
457
+ } else {
458
+ _runtime = ExpoRuntime(unsafePointer: runtimePointer)
459
+ }
438
460
  }
439
461
 
440
462
  @JavaScriptActor
@@ -0,0 +1,28 @@
1
+ // Copyright 2025-present 650 Industries. All rights reserved.
2
+
3
+ #pragma once
4
+
5
+ #ifdef __cplusplus
6
+
7
+ namespace expo {
8
+
9
+ /**
10
+ Trampoline that `ExpoModulesJSI` calls to dispatch work onto the JS thread.
11
+ Casts the `nativeScheduler` pointer back to a `react::RuntimeScheduler *` and
12
+ calls `scheduleTask` on it. The signature matches `expo::RuntimeScheduler::ScheduleFn`
13
+ declared in the xcframework's `RuntimeScheduler.h`.
14
+
15
+ Lives in ExpoModulesCore (rather than in the xcframework) so that
16
+ ExpoModulesJSI.framework's prebuilt binary doesn't need to link against
17
+ React-runtimescheduler — important for source-built RN, where those symbols
18
+ are hidden after link and unreachable via -undefined dynamic_lookup.
19
+
20
+ Hosts that initialize their own runtime (e.g. ExpoReactNativeFactory, Expo Go)
21
+ pass `&expo::dispatchOnReactScheduler` as the `dispatch` argument to
22
+ `AppContext.setRuntime`.
23
+ */
24
+ void dispatchOnReactScheduler(void *nativeScheduler, int priority, void (^callback)()) noexcept;
25
+
26
+ } // namespace expo
27
+
28
+ #endif // __cplusplus
@@ -0,0 +1,19 @@
1
+ // Copyright 2025-present 650 Industries. All rights reserved.
2
+
3
+ #import "EXReactSchedulerDispatch.h"
4
+
5
+ #import <react/renderer/runtimescheduler/RuntimeScheduler.h>
6
+
7
+ namespace expo {
8
+
9
+ void dispatchOnReactScheduler(void *nativeScheduler, int priority, void (^callback)()) noexcept
10
+ {
11
+ auto *scheduler = static_cast<facebook::react::RuntimeScheduler *>(nativeScheduler);
12
+ scheduler->scheduleTask(
13
+ static_cast<facebook::react::SchedulerPriority>(priority),
14
+ [callback](facebook::jsi::Runtime &) {
15
+ callback();
16
+ });
17
+ }
18
+
19
+ } // namespace expo
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-modules-core",
3
- "version": "56.0.5",
3
+ "version": "56.0.6",
4
4
  "description": "The core of Expo Modules architecture",
5
5
  "main": "src/index.ts",
6
6
  "types": "build/index.d.ts",
@@ -47,7 +47,7 @@
47
47
  },
48
48
  "dependencies": {
49
49
  "@expo/expo-modules-macros-plugin": "~0.0.8",
50
- "expo-modules-jsi": "~56.0.2",
50
+ "expo-modules-jsi": "~56.0.3",
51
51
  "invariant": "^2.2.4"
52
52
  },
53
53
  "peerDependencies": {
@@ -66,7 +66,7 @@
66
66
  "@types/invariant": "^2.2.33",
67
67
  "expo-module-scripts": "56.0.2"
68
68
  },
69
- "gitHead": "a30353e69ca0d72b9fac5830abc631feda1ba3ae",
69
+ "gitHead": "42013232893cb2aa71ab218e9b422d4a8476b3f0",
70
70
  "scripts": {
71
71
  "build": "expo-module build",
72
72
  "clean": "expo-module clean",