expo 55.0.0-canary-20251008-6acbc1c → 55.0.0-canary-20251008-f2d1b4a

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.
@@ -32,7 +32,7 @@ buildscript {
32
32
  def reactNativeVersion = project.extensions.getByType(ExpoModuleExtension).reactNativeVersion
33
33
 
34
34
  group = 'host.exp.exponent'
35
- version = '55.0.0-canary-20251008-6acbc1c'
35
+ version = '55.0.0-canary-20251008-f2d1b4a'
36
36
 
37
37
  expoModule {
38
38
  // We can't prebuild the module because it depends on the generated files.
@@ -43,7 +43,7 @@ android {
43
43
  namespace "expo.core"
44
44
  defaultConfig {
45
45
  versionCode 1
46
- versionName "55.0.0-canary-20251008-6acbc1c"
46
+ versionName "55.0.0-canary-20251008-f2d1b4a"
47
47
  consumerProguardFiles("proguard-rules.pro")
48
48
  }
49
49
  testOptions {
@@ -35,101 +35,103 @@ import com.facebook.react.devsupport.interfaces.StackFrame
35
35
  * * is kept for backward compatibility.
36
36
  */
37
37
  internal open class ExpoBridgelessDevSupportManager(
38
- applicationContext: Context,
39
- reactInstanceManagerHelper: ReactInstanceDevHelper,
40
- packagerPathForJSBundleName: String?,
41
- enableOnCreate: Boolean,
42
- redBoxHandler: RedBoxHandler?,
43
- devBundleDownloadListener: DevBundleDownloadListener?,
44
- minNumShakes: Int,
45
- customPackagerCommandHandlers: Map<String, RequestHandler>?,
46
- surfaceDelegateFactory: SurfaceDelegateFactory?,
47
- devLoadingViewManager: DevLoadingViewManager?,
48
- pausedInDebuggerOverlayManager: PausedInDebuggerOverlayManager?
38
+ applicationContext: Context,
39
+ reactInstanceManagerHelper: ReactInstanceDevHelper,
40
+ packagerPathForJSBundleName: String?,
41
+ enableOnCreate: Boolean,
42
+ redBoxHandler: RedBoxHandler?,
43
+ devBundleDownloadListener: DevBundleDownloadListener?,
44
+ minNumShakes: Int,
45
+ customPackagerCommandHandlers: Map<String, RequestHandler>?,
46
+ surfaceDelegateFactory: SurfaceDelegateFactory?,
47
+ devLoadingViewManager: DevLoadingViewManager?,
48
+ pausedInDebuggerOverlayManager: PausedInDebuggerOverlayManager?
49
49
  ) :
50
- DevSupportManagerBase(
51
- applicationContext,
52
- reactInstanceManagerHelper,
53
- packagerPathForJSBundleName,
54
- enableOnCreate,
55
- redBoxHandler,
56
- devBundleDownloadListener,
57
- minNumShakes,
58
- customPackagerCommandHandlers,
59
- surfaceDelegateFactory,
60
- devLoadingViewManager,
61
- pausedInDebuggerOverlayManager) {
50
+ DevSupportManagerBase(
51
+ applicationContext,
52
+ reactInstanceManagerHelper,
53
+ packagerPathForJSBundleName,
54
+ enableOnCreate,
55
+ redBoxHandler,
56
+ devBundleDownloadListener,
57
+ minNumShakes,
58
+ customPackagerCommandHandlers,
59
+ surfaceDelegateFactory,
60
+ devLoadingViewManager,
61
+ pausedInDebuggerOverlayManager
62
+ ) {
62
63
 
63
- override val uniqueTag: String
64
- get() = "Bridgeless"
64
+ override val uniqueTag: String
65
+ get() = "Bridgeless"
65
66
 
66
- override fun handleReloadJS() {
67
- UiThreadUtil.assertOnUiThread()
68
- // dismiss redbox if exists
69
- hideRedboxDialog()
70
- reactInstanceDevHelper.reload("BridgelessDevSupportManager.handleReloadJS()")
71
- }
67
+ override fun handleReloadJS() {
68
+ UiThreadUtil.assertOnUiThread()
69
+ // dismiss redbox if exists
70
+ hideRedboxDialog()
71
+ reactInstanceDevHelper.reload("BridgelessDevSupportManager.handleReloadJS()")
72
+ }
72
73
  }
73
74
 
74
75
  internal class ExpoDevSupportManagerWithLogBoxOverride(
75
- applicationContext: Context,
76
- reactInstanceManagerHelper: ReactInstanceDevHelper,
77
- packagerPathForJSBundleName: String?,
78
- enableOnCreate: Boolean,
79
- redBoxHandler: RedBoxHandler?,
80
- devBundleDownloadListener: DevBundleDownloadListener?,
81
- minNumShakes: Int,
82
- customPackagerCommandHandlers: Map<String, RequestHandler>?,
83
- surfaceDelegateFactory: SurfaceDelegateFactory?,
84
- devLoadingViewManager: DevLoadingViewManager?,
85
- pausedInDebuggerOverlayManager: PausedInDebuggerOverlayManager?
76
+ applicationContext: Context,
77
+ reactInstanceManagerHelper: ReactInstanceDevHelper,
78
+ packagerPathForJSBundleName: String?,
79
+ enableOnCreate: Boolean,
80
+ redBoxHandler: RedBoxHandler?,
81
+ devBundleDownloadListener: DevBundleDownloadListener?,
82
+ minNumShakes: Int,
83
+ customPackagerCommandHandlers: Map<String, RequestHandler>?,
84
+ surfaceDelegateFactory: SurfaceDelegateFactory?,
85
+ devLoadingViewManager: DevLoadingViewManager?,
86
+ pausedInDebuggerOverlayManager: PausedInDebuggerOverlayManager?
86
87
  ) :
87
- ExpoBridgelessDevSupportManager(
88
- applicationContext,
89
- reactInstanceManagerHelper,
90
- packagerPathForJSBundleName,
91
- enableOnCreate,
92
- redBoxHandler,
93
- devBundleDownloadListener,
94
- minNumShakes,
95
- customPackagerCommandHandlers,
96
- surfaceDelegateFactory,
97
- devLoadingViewManager,
98
- pausedInDebuggerOverlayManager) {
88
+ ExpoBridgelessDevSupportManager(
89
+ applicationContext,
90
+ reactInstanceManagerHelper,
91
+ packagerPathForJSBundleName,
92
+ enableOnCreate,
93
+ redBoxHandler,
94
+ devBundleDownloadListener,
95
+ minNumShakes,
96
+ customPackagerCommandHandlers,
97
+ surfaceDelegateFactory,
98
+ devLoadingViewManager,
99
+ pausedInDebuggerOverlayManager
100
+ ) {
99
101
 
100
- private var redBoxSurfaceDelegate: SurfaceDelegate? = null
102
+ private var redBoxSurfaceDelegate: SurfaceDelegate? = null
101
103
 
102
- override fun hideRedboxDialog() {
103
- redBoxSurfaceDelegate?.hide()
104
- }
104
+ override fun hideRedboxDialog() {
105
+ redBoxSurfaceDelegate?.hide()
106
+ }
105
107
 
106
- override fun showNewJavaError(message: String?, e: Throwable) {
107
- showNewError(message, convertJavaStackTrace(e))
108
- }
108
+ override fun showNewJavaError(message: String?, e: Throwable) {
109
+ showNewError(message, convertJavaStackTrace(e))
110
+ }
109
111
 
110
- override fun showNewJSError(message: String?, details: ReadableArray?, errorCookie: Int) {
111
- showNewError(message, convertJsStackTrace(details))
112
- }
112
+ override fun showNewJSError(message: String?, details: ReadableArray?, errorCookie: Int) {
113
+ showNewError(message, convertJsStackTrace(details))
114
+ }
113
115
 
114
- private fun showNewError(message: String?, stack: Array<StackFrame>) {
115
- UiThreadUtil.runOnUiThread {
116
- lastErrorTitle = message
117
- lastErrorStack = stack
116
+ private fun showNewError(message: String?, stack: Array<StackFrame>) {
117
+ UiThreadUtil.runOnUiThread {
118
+ lastErrorTitle = message
119
+ lastErrorStack = stack
118
120
 
119
- if (redBoxSurfaceDelegate == null) {
120
- this.redBoxSurfaceDelegate =
121
- createSurfaceDelegate("RedBox")
122
- ?: ExpoLogBoxSurfaceDelegate(this@ExpoDevSupportManagerWithLogBoxOverride).apply {
123
- createContentView("RedBox")
124
- }
121
+ if (redBoxSurfaceDelegate == null) {
122
+ this.redBoxSurfaceDelegate =
123
+ createSurfaceDelegate("RedBox")
124
+ ?: ExpoLogBoxSurfaceDelegate(this@ExpoDevSupportManagerWithLogBoxOverride).apply {
125
+ createContentView("RedBox")
125
126
  }
127
+ }
126
128
 
127
- if (redBoxSurfaceDelegate?.isShowing() == true) {
128
- // Sometimes errors cause multiple errors to be thrown in JS in quick succession. Only
129
- // show the first and most actionable one.
130
- return@runOnUiThread
131
- }
132
- redBoxSurfaceDelegate?.show()
133
- }
129
+ if (redBoxSurfaceDelegate?.isShowing() == true) {
130
+ // Sometimes errors cause multiple errors to be thrown in JS in quick succession. Only
131
+ // show the first and most actionable one.
132
+ return@runOnUiThread
133
+ }
134
+ redBoxSurfaceDelegate?.show()
134
135
  }
136
+ }
135
137
  }
@@ -29,117 +29,121 @@ import com.facebook.react.devsupport.ReleaseDevSupportManager
29
29
  */
30
30
  internal class ExpoDefaultDevSupportManagerFactory : DevSupportManagerFactory {
31
31
 
32
- override fun create(
33
- applicationContext: Context,
34
- reactInstanceManagerHelper: ReactInstanceDevHelper,
35
- packagerPathForJSBundleName: String?,
36
- enableOnCreate: Boolean,
37
- redBoxHandler: RedBoxHandler?,
38
- devBundleDownloadListener: DevBundleDownloadListener?,
39
- minNumShakes: Int,
40
- customPackagerCommandHandlers: Map<String, RequestHandler>?,
41
- surfaceDelegateFactory: SurfaceDelegateFactory?,
42
- devLoadingViewManager: DevLoadingViewManager?,
43
- pausedInDebuggerOverlayManager: PausedInDebuggerOverlayManager?
44
- ): DevSupportManager {
45
- return if (!enableOnCreate) {
46
- ReleaseDevSupportManager()
47
- } else
48
- try {
49
- // Developer support is enabled, we now must choose whether to return a DevSupportManager,
50
- // or a more lean profiling-only PerftestDevSupportManager. We make the choice by first
51
- // trying to return the full support DevSupportManager and if it fails, then just
52
- // return PerftestDevSupportManager.
32
+ override fun create(
33
+ applicationContext: Context,
34
+ reactInstanceManagerHelper: ReactInstanceDevHelper,
35
+ packagerPathForJSBundleName: String?,
36
+ enableOnCreate: Boolean,
37
+ redBoxHandler: RedBoxHandler?,
38
+ devBundleDownloadListener: DevBundleDownloadListener?,
39
+ minNumShakes: Int,
40
+ customPackagerCommandHandlers: Map<String, RequestHandler>?,
41
+ surfaceDelegateFactory: SurfaceDelegateFactory?,
42
+ devLoadingViewManager: DevLoadingViewManager?,
43
+ pausedInDebuggerOverlayManager: PausedInDebuggerOverlayManager?
44
+ ): DevSupportManager {
45
+ return if (!enableOnCreate) {
46
+ ReleaseDevSupportManager()
47
+ } else {
48
+ try {
49
+ // Developer support is enabled, we now must choose whether to return a DevSupportManager,
50
+ // or a more lean profiling-only PerftestDevSupportManager. We make the choice by first
51
+ // trying to return the full support DevSupportManager and if it fails, then just
52
+ // return PerftestDevSupportManager.
53
53
 
54
- // ProGuard is surprisingly smart in this case and will keep a class if it detects a call
55
- // to
56
- // Class.forName() with a static string. So instead we generate a quasi-dynamic string to
57
- // confuse it.
58
- val className =
59
- StringBuilder(DEVSUPPORT_IMPL_PACKAGE)
60
- .append(".")
61
- .append(DEVSUPPORT_IMPL_CLASS)
62
- .toString()
63
- val devSupportManagerClass = Class.forName(className)
64
- val constructor =
65
- devSupportManagerClass.getConstructor(
66
- Context::class.java,
67
- ReactInstanceDevHelper::class.java,
68
- String::class.java,
69
- Boolean::class.javaPrimitiveType,
70
- RedBoxHandler::class.java,
71
- DevBundleDownloadListener::class.java,
72
- Int::class.javaPrimitiveType,
73
- MutableMap::class.java,
74
- SurfaceDelegateFactory::class.java,
75
- DevLoadingViewManager::class.java,
76
- PausedInDebuggerOverlayManager::class.java)
77
- constructor.newInstance(
78
- applicationContext,
79
- reactInstanceManagerHelper,
80
- packagerPathForJSBundleName,
81
- true,
82
- redBoxHandler,
83
- devBundleDownloadListener,
84
- minNumShakes,
85
- customPackagerCommandHandlers,
86
- surfaceDelegateFactory,
87
- devLoadingViewManager,
88
- pausedInDebuggerOverlayManager) as DevSupportManager
89
- } catch (e: Exception) {
90
- throw e
91
- // Original implementation
92
- // https://github.com/facebook/react-native/blob/50273758510a6d756494d05dc91055516c2a6aca/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/DefaultDevSupportManagerFactory.kt#L95
54
+ // ProGuard is surprisingly smart in this case and will keep a class if it detects a call
55
+ // to
56
+ // Class.forName() with a static string. So instead we generate a quasi-dynamic string to
57
+ // confuse it.
58
+ val className =
59
+ StringBuilder(DEVSUPPORT_IMPL_PACKAGE)
60
+ .append(".")
61
+ .append(DEVSUPPORT_IMPL_CLASS)
62
+ .toString()
63
+ val devSupportManagerClass = Class.forName(className)
64
+ val constructor =
65
+ devSupportManagerClass.getConstructor(
66
+ Context::class.java,
67
+ ReactInstanceDevHelper::class.java,
68
+ String::class.java,
69
+ Boolean::class.javaPrimitiveType,
70
+ RedBoxHandler::class.java,
71
+ DevBundleDownloadListener::class.java,
72
+ Int::class.javaPrimitiveType,
73
+ MutableMap::class.java,
74
+ SurfaceDelegateFactory::class.java,
75
+ DevLoadingViewManager::class.java,
76
+ PausedInDebuggerOverlayManager::class.java
77
+ )
78
+ constructor.newInstance(
79
+ applicationContext,
80
+ reactInstanceManagerHelper,
81
+ packagerPathForJSBundleName,
82
+ true,
83
+ redBoxHandler,
84
+ devBundleDownloadListener,
85
+ minNumShakes,
86
+ customPackagerCommandHandlers,
87
+ surfaceDelegateFactory,
88
+ devLoadingViewManager,
89
+ pausedInDebuggerOverlayManager
90
+ ) as DevSupportManager
91
+ } catch (e: Exception) {
92
+ throw e
93
+ // Original implementation
94
+ // https://github.com/facebook/react-native/blob/50273758510a6d756494d05dc91055516c2a6aca/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/DefaultDevSupportManagerFactory.kt#L95
93
95
 
94
- // React Native implementation fallback is PerftestDevSupportManager(applicationContext)
95
- // but that's internal class we would have to vendor, so this impl re-throws.
96
- // https://github.com/facebook/react-native/blob/50273758510a6d756494d05dc91055516c2a6aca/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/PerftestDevSupportManager.kt#L17
97
- }
96
+ // React Native implementation fallback is PerftestDevSupportManager(applicationContext)
97
+ // but that's internal class we would have to vendor, so this impl re-throws.
98
+ // https://github.com/facebook/react-native/blob/50273758510a6d756494d05dc91055516c2a6aca/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/PerftestDevSupportManager.kt#L17
99
+ }
98
100
  }
101
+ }
99
102
 
100
- override fun create(
101
- applicationContext: Context,
102
- reactInstanceManagerHelper: ReactInstanceDevHelper,
103
- packagerPathForJSBundleName: String?,
104
- enableOnCreate: Boolean,
105
- redBoxHandler: RedBoxHandler?,
106
- devBundleDownloadListener: DevBundleDownloadListener?,
107
- minNumShakes: Int,
108
- customPackagerCommandHandlers: Map<String, RequestHandler>?,
109
- surfaceDelegateFactory: SurfaceDelegateFactory?,
110
- devLoadingViewManager: DevLoadingViewManager?,
111
- pausedInDebuggerOverlayManager: PausedInDebuggerOverlayManager?,
112
- useDevSupport: Boolean
113
- ): DevSupportManager =
114
- if (ReactBuildConfig.UNSTABLE_ENABLE_FUSEBOX_RELEASE) {
115
- // Should never happen as ExpoDefaultDevSupportManagerFactory is only used if useDevSupport = true
116
- throw Error("ExpoDefaultDevSupportManagerFactory supports debug builds only. ReactBuildConfig.UNSTABLE_ENABLE_FUSEBOX_RELEASE is unsupported.")
103
+ override fun create(
104
+ applicationContext: Context,
105
+ reactInstanceManagerHelper: ReactInstanceDevHelper,
106
+ packagerPathForJSBundleName: String?,
107
+ enableOnCreate: Boolean,
108
+ redBoxHandler: RedBoxHandler?,
109
+ devBundleDownloadListener: DevBundleDownloadListener?,
110
+ minNumShakes: Int,
111
+ customPackagerCommandHandlers: Map<String, RequestHandler>?,
112
+ surfaceDelegateFactory: SurfaceDelegateFactory?,
113
+ devLoadingViewManager: DevLoadingViewManager?,
114
+ pausedInDebuggerOverlayManager: PausedInDebuggerOverlayManager?,
115
+ useDevSupport: Boolean
116
+ ): DevSupportManager =
117
+ if (ReactBuildConfig.UNSTABLE_ENABLE_FUSEBOX_RELEASE) {
118
+ // Should never happen as ExpoDefaultDevSupportManagerFactory is only used if useDevSupport = true
119
+ throw Error("ExpoDefaultDevSupportManagerFactory supports debug builds only. ReactBuildConfig.UNSTABLE_ENABLE_FUSEBOX_RELEASE is unsupported.")
117
120
 
118
- // Original implementation
119
- // https://github.com/facebook/react-native/blob/50273758510a6d756494d05dc91055516c2a6aca/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/DefaultDevSupportManagerFactory.kt#L114
121
+ // Original implementation
122
+ // https://github.com/facebook/react-native/blob/50273758510a6d756494d05dc91055516c2a6aca/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/DefaultDevSupportManagerFactory.kt#L114
120
123
 
121
- // React Native implementation uses PerftestDevSupportManager(applicationContext)
122
- // but that's internal class we would have to vendor, so this impl re-throws.
123
- // https://github.com/facebook/react-native/blob/50273758510a6d756494d05dc91055516c2a6aca/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/PerftestDevSupportManager.kt#L17
124
- } else if (useDevSupport) {
125
- ExpoDevSupportManagerWithLogBoxOverride(
126
- applicationContext,
127
- reactInstanceManagerHelper,
128
- packagerPathForJSBundleName,
129
- enableOnCreate,
130
- redBoxHandler,
131
- devBundleDownloadListener,
132
- minNumShakes,
133
- customPackagerCommandHandlers,
134
- surfaceDelegateFactory,
135
- devLoadingViewManager,
136
- pausedInDebuggerOverlayManager)
137
- } else {
138
- ReleaseDevSupportManager()
139
- }
140
-
141
- private companion object {
142
- private const val DEVSUPPORT_IMPL_PACKAGE = "com.facebook.react.devsupport"
143
- private const val DEVSUPPORT_IMPL_CLASS = "BridgeDevSupportManager"
124
+ // React Native implementation uses PerftestDevSupportManager(applicationContext)
125
+ // but that's internal class we would have to vendor, so this impl re-throws.
126
+ // https://github.com/facebook/react-native/blob/50273758510a6d756494d05dc91055516c2a6aca/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/PerftestDevSupportManager.kt#L17
127
+ } else if (useDevSupport) {
128
+ ExpoDevSupportManagerWithLogBoxOverride(
129
+ applicationContext,
130
+ reactInstanceManagerHelper,
131
+ packagerPathForJSBundleName,
132
+ enableOnCreate,
133
+ redBoxHandler,
134
+ devBundleDownloadListener,
135
+ minNumShakes,
136
+ customPackagerCommandHandlers,
137
+ surfaceDelegateFactory,
138
+ devLoadingViewManager,
139
+ pausedInDebuggerOverlayManager
140
+ )
141
+ } else {
142
+ ReleaseDevSupportManager()
144
143
  }
144
+
145
+ private companion object {
146
+ private const val DEVSUPPORT_IMPL_PACKAGE = "com.facebook.react.devsupport"
147
+ private const val DEVSUPPORT_IMPL_CLASS = "BridgeDevSupportManager"
148
+ }
145
149
  }
@@ -5,7 +5,6 @@ package expo.modules
5
5
  import android.content.Context
6
6
  import com.facebook.react.ReactHost
7
7
  import com.facebook.react.ReactInstanceEventListener
8
- import com.facebook.react.ReactNativeHost
9
8
  import com.facebook.react.ReactPackage
10
9
  import com.facebook.react.ReactPackageTurboModuleManagerDelegate
11
10
  import com.facebook.react.bridge.JSBundleLoader
@@ -43,6 +42,24 @@ object ExpoReactHostFactory {
43
42
  private val hostHandlers: List<ReactNativeHostHandler>
44
43
  ) : ReactHostDelegate {
45
44
 
45
+ val hostDelegateJsBundleFilePath: String? by lazy {
46
+ hostHandlers.asSequence()
47
+ .mapNotNull { it.getJSBundleFile(useDevSupport) }
48
+ .firstOrNull() ?: jsBundleFilePath
49
+ }
50
+
51
+ val hostDelegateJSBundleAssetPath: String? by lazy {
52
+ hostHandlers.asSequence()
53
+ .mapNotNull { it.getBundleAssetName(useDevSupport) }
54
+ .firstOrNull() ?: jsBundleAssetPath
55
+ }
56
+
57
+ val hostDelegateUseDeveloperSupport: Boolean by lazy {
58
+ hostHandlers.asSequence()
59
+ .mapNotNull { it.useDeveloperSupport }
60
+ .firstOrNull() ?: useDevSupport
61
+ }
62
+
46
63
  // Keeps this `_jsBundleLoader` backing property for DevLauncher to replace its internal value
47
64
  private var _jsBundleLoader: JSBundleLoader? = null
48
65
  override val jsBundleLoader: JSBundleLoader
@@ -52,14 +69,14 @@ object ExpoReactHostFactory {
52
69
  return backingJSBundleLoader
53
70
  }
54
71
  val context = weakContext.get() ?: throw IllegalStateException("Unable to get concrete Context")
55
- jsBundleFilePath?.let { jsBundleFile ->
72
+ hostDelegateJsBundleFilePath?.let { jsBundleFile ->
56
73
  if (jsBundleFile.startsWith("assets://")) {
57
74
  return JSBundleLoader.createAssetLoader(context, jsBundleFile, true)
58
75
  }
59
76
  return JSBundleLoader.createFileLoader(jsBundleFile)
60
77
  }
61
78
 
62
- return JSBundleLoader.createAssetLoader(context, "assets://$jsBundleAssetPath", true)
79
+ return JSBundleLoader.createAssetLoader(context, "assets://$hostDelegateJSBundleAssetPath", true)
63
80
  }
64
81
 
65
82
  override val jsRuntimeFactory: JSRuntimeFactory
@@ -73,76 +90,9 @@ object ExpoReactHostFactory {
73
90
  throw error
74
91
  }
75
92
  hostHandlers.forEach { handler ->
76
- handler.onReactInstanceException(useDevSupport, error)
77
- }
78
- }
79
- }
80
-
81
- @OptIn(UnstableReactNativeAPI::class)
82
- @JvmStatic
83
- fun createFromReactNativeHost(
84
- context: Context,
85
- reactNativeHost: ReactNativeHost
86
- ): ReactHost {
87
- require(reactNativeHost is ReactNativeHostWrapper) {
88
- "You can call createFromReactNativeHost only with instances of ReactNativeHostWrapper"
89
- }
90
- if (reactHost == null) {
91
- val useDeveloperSupport = reactNativeHost.useDeveloperSupport
92
- val componentFactory = ComponentFactory()
93
- DefaultComponentsRegistry.register(componentFactory)
94
-
95
- reactNativeHost.reactNativeHostHandlers.forEach { handler ->
96
- handler.onWillCreateReactInstance(useDeveloperSupport)
97
- }
98
-
99
- val reactHostDelegate = ExpoReactHostDelegate(
100
- WeakReference(context),
101
- reactNativeHost.packages,
102
- reactNativeHost.jsMainModuleName,
103
- reactNativeHost.bundleAssetName,
104
- reactNativeHost.jsBundleFile,
105
- reactNativeHost.useDeveloperSupport,
106
- hostHandlers = reactNativeHost.reactNativeHostHandlers
107
- )
108
-
109
- val reactHostImpl = when {
110
- ExpoLogBoxBuildConfig.UNSTABLE_IS_ENABLED && useDeveloperSupport -> ReactHostImpl(
111
- context,
112
- reactHostDelegate,
113
- componentFactory,
114
- Executors.newSingleThreadExecutor(),
115
- Task.UI_THREAD_EXECUTOR,
116
- allowPackagerServerAccess = true,
117
- useDevSupport = true,
118
- devSupportManagerFactory = ExpoDefaultDevSupportManagerFactory(),
119
- )
120
- else -> ReactHostImpl(
121
- context,
122
- reactHostDelegate,
123
- componentFactory,
124
- true,
125
- useDeveloperSupport
126
- )
127
- }
128
-
129
- reactNativeHost.reactNativeHostHandlers.forEach { handler ->
130
- handler.onDidCreateDevSupportManager(reactHostImpl.devSupportManager)
93
+ handler.onReactInstanceException(hostDelegateUseDeveloperSupport, error)
131
94
  }
132
-
133
-
134
-
135
- reactHostImpl.addReactInstanceEventListener(object : ReactInstanceEventListener {
136
- override fun onReactContextInitialized(context: ReactContext) {
137
- reactNativeHost.reactNativeHostHandlers.forEach { handler ->
138
- handler.onDidCreateReactInstance(useDeveloperSupport, context)
139
- }
140
- }
141
- })
142
-
143
- reactHost = reactHostImpl
144
95
  }
145
- return reactHost as ReactHost
146
96
  }
147
97
 
148
98
  @OptIn(UnstableReactNativeAPI::class)
@@ -178,14 +128,25 @@ object ExpoReactHostFactory {
178
128
  handler.onWillCreateReactInstance(useDevSupport)
179
129
  }
180
130
 
181
- val reactHostImpl =
182
- ReactHostImpl(
131
+ val reactHostImpl = when {
132
+ ExpoLogBoxBuildConfig.UNSTABLE_IS_ENABLED && useDevSupport -> ReactHostImpl(
133
+ context,
134
+ reactHostDelegate,
135
+ componentFactory,
136
+ Executors.newSingleThreadExecutor(),
137
+ Task.UI_THREAD_EXECUTOR,
138
+ allowPackagerServerAccess = true,
139
+ useDevSupport = true,
140
+ devSupportManagerFactory = ExpoDefaultDevSupportManagerFactory()
141
+ )
142
+ else -> ReactHostImpl(
183
143
  context,
184
144
  reactHostDelegate,
185
145
  componentFactory,
186
146
  true,
187
147
  useDevSupport
188
148
  )
149
+ }
189
150
 
190
151
  hostHandlers.forEach { handler ->
191
152
  handler.onDidCreateDevSupportManager(reactHostImpl.devSupportManager)
@@ -22,7 +22,6 @@ import com.facebook.react.ReactDelegate
22
22
  import com.facebook.react.ReactHost
23
23
  import com.facebook.react.ReactInstanceEventListener
24
24
  import com.facebook.react.ReactInstanceManager
25
- import com.facebook.react.ReactNativeHost
26
25
  import com.facebook.react.ReactRootView
27
26
  import com.facebook.react.bridge.ReactContext
28
27
  import com.facebook.react.modules.core.PermissionListener
@@ -56,9 +55,6 @@ class ReactActivityDelegateWrapper(
56
55
  private val reactActivityHandlers = ExpoModulesPackage.packageList
57
56
  .flatMap { it.createReactActivityHandlers(activity) }
58
57
  private val methodMap: ArrayMap<String, Method> = ArrayMap()
59
- private val _reactNativeHost: ReactNativeHost by lazy {
60
- invokeDelegateMethod("getReactNativeHost")
61
- }
62
58
  private val _reactHost: ReactHost? by lazy {
63
59
  delegate.reactHost
64
60
  }
@@ -103,10 +99,6 @@ class ReactActivityDelegateWrapper(
103
99
  return invokeDelegateMethod("getReactDelegate")
104
100
  }
105
101
 
106
- override fun getReactNativeHost(): ReactNativeHost {
107
- return _reactNativeHost
108
- }
109
-
110
102
  override fun getReactHost(): ReactHost? {
111
103
  return _reactHost
112
104
  }
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
+ import { DOMPropsInternal } from './dom-internal.types';
2
3
  import ExpoDomWebView from './webview/ExpoDOMWebView';
3
4
  import RNWebView from './webview/RNWebView';
4
- import { DOMPropsInternal } from './dom-internal.types';
5
5
  type RawWebViewProps = React.ComponentProps<Exclude<typeof ExpoDomWebView, undefined>> & React.ComponentProps<Exclude<typeof RNWebView, undefined>>;
6
6
  interface Props {
7
7
  children?: any;
@@ -1 +1 @@
1
- {"version":3,"file":"webview-wrapper.d.ts","sourceRoot":"","sources":["../../src/dom/webview-wrapper.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAc1B,OAAO,cAAc,MAAM,0BAA0B,CAAC;AACtD,OAAO,SAAS,MAAM,qBAAqB,CAAC;AAE5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAExD,KAAK,eAAe,GAAG,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,OAAO,cAAc,EAAE,SAAS,CAAC,CAAC,GACpF,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,OAAO,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC;AAE7D,UAAU,KAAK;IACb,QAAQ,CAAC,EAAE,GAAG,CAAC;IACf,GAAG,CAAC,EAAE,gBAAgB,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,GAAG,EAAE,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACvB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC7B;AAED,QAAA,MAAM,UAAU,mFAkMd,CAAC;AAiBH,wBAAgB,cAAc,CAC5B,iBAAiB,EAAE,OAAO,GACzB,KAAK,CAAC,yBAAyB,CAAC,eAAe,CAAC,CASlD;AAED,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"webview-wrapper.d.ts","sourceRoot":"","sources":["../../src/dom/webview-wrapper.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAWxD,OAAO,cAAc,MAAM,0BAA0B,CAAC;AACtD,OAAO,SAAS,MAAM,qBAAqB,CAAC;AAG5C,KAAK,eAAe,GAAG,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,OAAO,cAAc,EAAE,SAAS,CAAC,CAAC,GACpF,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,OAAO,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC;AAE7D,UAAU,KAAK;IACb,QAAQ,CAAC,EAAE,GAAG,CAAC;IACf,GAAG,CAAC,EAAE,gBAAgB,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,GAAG,EAAE,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACvB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC7B;AAED,QAAA,MAAM,UAAU,mFAkMd,CAAC;AAiBH,wBAAgB,cAAc,CAC5B,iBAAiB,EAAE,OAAO,GACzB,KAAK,CAAC,yBAAyB,CAAC,eAAe,CAAC,CASlD;AAED,eAAe,UAAU,CAAC"}
@@ -1,8 +1,8 @@
1
1
  {
2
- "@expo/fingerprint": "0.15.2-canary-20251008-6acbc1c",
3
- "@expo/metro-runtime": "6.1.3-canary-20251008-6acbc1c",
2
+ "@expo/fingerprint": "0.15.2-canary-20251008-f2d1b4a",
3
+ "@expo/metro-runtime": "6.1.3-canary-20251008-f2d1b4a",
4
4
  "@expo/vector-icons": "^15.0.2",
5
- "@expo/ui": "0.2.0-canary-20251008-6acbc1c",
5
+ "@expo/ui": "0.2.0-canary-20251008-f2d1b4a",
6
6
  "@react-native-async-storage/async-storage": "2.2.0",
7
7
  "@react-native-community/datetimepicker": "8.4.4",
8
8
  "@react-native-masked-view/masked-view": "0.3.2",
@@ -12,84 +12,84 @@
12
12
  "@react-native-picker/picker": "2.11.2",
13
13
  "@react-native-segmented-control/segmented-control": "2.5.7",
14
14
  "@stripe/stripe-react-native": "0.50.3",
15
- "eslint-config-expo": "10.0.1-canary-20251008-6acbc1c",
15
+ "eslint-config-expo": "10.0.1-canary-20251008-f2d1b4a",
16
16
  "expo-analytics-amplitude": "~11.3.0",
17
17
  "expo-app-auth": "~11.1.0",
18
18
  "expo-app-loader-provider": "~8.0.0",
19
- "expo-apple-authentication": "8.0.8-canary-20251008-6acbc1c",
20
- "expo-application": "7.0.8-canary-20251008-6acbc1c",
21
- "expo-asset": "12.0.10-canary-20251008-6acbc1c",
22
- "expo-audio": "1.1.0-canary-20251008-6acbc1c",
23
- "expo-auth-session": "7.0.9-canary-20251008-6acbc1c",
24
- "expo-av": "16.0.8-canary-20251008-6acbc1c",
25
- "expo-background-fetch": "14.0.8-canary-20251008-6acbc1c",
26
- "expo-background-task": "1.0.9-canary-20251008-6acbc1c",
27
- "expo-battery": "10.0.8-canary-20251008-6acbc1c",
28
- "expo-blur": "15.0.8-canary-20251008-6acbc1c",
29
- "expo-brightness": "14.0.8-canary-20251008-6acbc1c",
30
- "expo-build-properties": "1.0.10-canary-20251008-6acbc1c",
31
- "expo-calendar": "15.0.8-canary-20251008-6acbc1c",
32
- "expo-camera": "17.0.9-canary-20251008-6acbc1c",
33
- "expo-cellular": "8.0.8-canary-20251008-6acbc1c",
34
- "expo-checkbox": "5.0.8-canary-20251008-6acbc1c",
35
- "expo-clipboard": "8.0.8-canary-20251008-6acbc1c",
36
- "expo-constants": "18.0.10-canary-20251008-6acbc1c",
37
- "expo-contacts": "15.0.10-canary-20251008-6acbc1c",
38
- "expo-crypto": "15.0.8-canary-20251008-6acbc1c",
39
- "expo-dev-client": "6.0.14-canary-20251008-6acbc1c",
40
- "expo-device": "8.0.10-canary-20251008-6acbc1c",
41
- "expo-document-picker": "14.0.8-canary-20251008-6acbc1c",
42
- "expo-file-system": "19.0.17-canary-20251008-6acbc1c",
43
- "expo-font": "14.0.9-canary-20251008-6acbc1c",
44
- "expo-gl": "16.0.8-canary-20251008-6acbc1c",
45
- "expo-glass-effect": "0.1.5-canary-20251008-6acbc1c",
19
+ "expo-apple-authentication": "8.0.8-canary-20251008-f2d1b4a",
20
+ "expo-application": "7.0.8-canary-20251008-f2d1b4a",
21
+ "expo-asset": "12.0.10-canary-20251008-f2d1b4a",
22
+ "expo-audio": "1.1.0-canary-20251008-f2d1b4a",
23
+ "expo-auth-session": "7.0.9-canary-20251008-f2d1b4a",
24
+ "expo-av": "16.0.8-canary-20251008-f2d1b4a",
25
+ "expo-background-fetch": "14.0.8-canary-20251008-f2d1b4a",
26
+ "expo-background-task": "1.0.9-canary-20251008-f2d1b4a",
27
+ "expo-battery": "10.0.8-canary-20251008-f2d1b4a",
28
+ "expo-blur": "15.0.8-canary-20251008-f2d1b4a",
29
+ "expo-brightness": "15.0.0-canary-20251008-f2d1b4a",
30
+ "expo-build-properties": "1.0.10-canary-20251008-f2d1b4a",
31
+ "expo-calendar": "15.0.8-canary-20251008-f2d1b4a",
32
+ "expo-camera": "17.0.9-canary-20251008-f2d1b4a",
33
+ "expo-cellular": "8.0.8-canary-20251008-f2d1b4a",
34
+ "expo-checkbox": "5.0.8-canary-20251008-f2d1b4a",
35
+ "expo-clipboard": "8.0.8-canary-20251008-f2d1b4a",
36
+ "expo-constants": "18.0.10-canary-20251008-f2d1b4a",
37
+ "expo-contacts": "15.0.10-canary-20251008-f2d1b4a",
38
+ "expo-crypto": "15.0.8-canary-20251008-f2d1b4a",
39
+ "expo-dev-client": "6.0.14-canary-20251008-f2d1b4a",
40
+ "expo-device": "8.0.10-canary-20251008-f2d1b4a",
41
+ "expo-document-picker": "14.0.8-canary-20251008-f2d1b4a",
42
+ "expo-file-system": "19.0.17-canary-20251008-f2d1b4a",
43
+ "expo-font": "14.0.9-canary-20251008-f2d1b4a",
44
+ "expo-gl": "16.0.8-canary-20251008-f2d1b4a",
45
+ "expo-glass-effect": "0.1.5-canary-20251008-f2d1b4a",
46
46
  "expo-google-app-auth": "~8.3.0",
47
- "expo-haptics": "15.0.8-canary-20251008-6acbc1c",
48
- "expo-image": "3.1.0-canary-20251008-6acbc1c",
49
- "expo-image-loader": "6.0.1-canary-20251008-6acbc1c",
50
- "expo-image-manipulator": "14.0.8-canary-20251008-6acbc1c",
51
- "expo-image-picker": "17.0.9-canary-20251008-6acbc1c",
52
- "expo-intent-launcher": "13.0.8-canary-20251008-6acbc1c",
53
- "expo-insights": "0.10.8-canary-20251008-6acbc1c",
54
- "expo-keep-awake": "15.0.8-canary-20251008-6acbc1c",
55
- "expo-linear-gradient": "15.0.8-canary-20251008-6acbc1c",
56
- "expo-linking": "8.0.9-canary-20251008-6acbc1c",
57
- "expo-local-authentication": "17.0.8-canary-20251008-6acbc1c",
58
- "expo-localization": "17.0.8-canary-20251008-6acbc1c",
59
- "expo-location": "19.0.8-canary-20251008-6acbc1c",
60
- "expo-mail-composer": "15.0.8-canary-20251008-6acbc1c",
61
- "expo-manifests": "1.0.9-canary-20251008-6acbc1c",
62
- "expo-maps": "0.12.9-canary-20251008-6acbc1c",
63
- "expo-media-library": "18.3.0-canary-20251008-6acbc1c",
64
- "expo-mesh-gradient": "0.4.8-canary-20251008-6acbc1c",
65
- "expo-module-template": "11.0.16-canary-20251008-6acbc1c",
66
- "expo-modules-core": "3.1.0-canary-20251008-6acbc1c",
67
- "expo-navigation-bar": "5.0.9-canary-20251008-6acbc1c",
68
- "expo-network": "8.0.8-canary-20251008-6acbc1c",
69
- "expo-notifications": "1.0.0-canary-20251008-6acbc1c",
70
- "expo-print": "15.0.8-canary-20251008-6acbc1c",
71
- "expo-live-photo": "1.0.8-canary-20251008-6acbc1c",
72
- "expo-router": "6.1.0-canary-20251008-6acbc1c",
73
- "expo-screen-capture": "8.0.9-canary-20251008-6acbc1c",
74
- "expo-screen-orientation": "9.0.8-canary-20251008-6acbc1c",
75
- "expo-secure-store": "15.0.8-canary-20251008-6acbc1c",
76
- "expo-sensors": "15.0.8-canary-20251008-6acbc1c",
77
- "expo-sharing": "14.0.8-canary-20251008-6acbc1c",
78
- "expo-sms": "14.0.8-canary-20251008-6acbc1c",
79
- "expo-speech": "14.0.8-canary-20251008-6acbc1c",
80
- "expo-splash-screen": "31.0.11-canary-20251008-6acbc1c",
81
- "expo-sqlite": "16.0.9-canary-20251008-6acbc1c",
82
- "expo-status-bar": "3.0.9-canary-20251008-6acbc1c",
83
- "expo-store-review": "9.0.9-canary-20251008-6acbc1c",
84
- "expo-symbols": "1.1.0-canary-20251008-6acbc1c",
85
- "expo-system-ui": "6.0.8-canary-20251008-6acbc1c",
86
- "expo-task-manager": "14.0.8-canary-20251008-6acbc1c",
87
- "expo-tracking-transparency": "6.0.8-canary-20251008-6acbc1c",
88
- "expo-updates": "29.1.0-canary-20251008-6acbc1c",
89
- "expo-video-thumbnails": "10.0.8-canary-20251008-6acbc1c",
90
- "expo-video": "3.0.12-canary-20251008-6acbc1c",
91
- "expo-web-browser": "15.0.9-canary-20251008-6acbc1c",
92
- "jest-expo": "55.0.0-canary-20251008-6acbc1c",
47
+ "expo-haptics": "15.0.8-canary-20251008-f2d1b4a",
48
+ "expo-image": "3.1.0-canary-20251008-f2d1b4a",
49
+ "expo-image-loader": "6.0.1-canary-20251008-f2d1b4a",
50
+ "expo-image-manipulator": "14.0.8-canary-20251008-f2d1b4a",
51
+ "expo-image-picker": "17.0.9-canary-20251008-f2d1b4a",
52
+ "expo-intent-launcher": "13.0.8-canary-20251008-f2d1b4a",
53
+ "expo-insights": "0.10.8-canary-20251008-f2d1b4a",
54
+ "expo-keep-awake": "15.0.8-canary-20251008-f2d1b4a",
55
+ "expo-linear-gradient": "15.0.8-canary-20251008-f2d1b4a",
56
+ "expo-linking": "8.0.9-canary-20251008-f2d1b4a",
57
+ "expo-local-authentication": "17.0.8-canary-20251008-f2d1b4a",
58
+ "expo-localization": "17.0.8-canary-20251008-f2d1b4a",
59
+ "expo-location": "19.0.8-canary-20251008-f2d1b4a",
60
+ "expo-mail-composer": "15.0.8-canary-20251008-f2d1b4a",
61
+ "expo-manifests": "1.0.9-canary-20251008-f2d1b4a",
62
+ "expo-maps": "0.12.9-canary-20251008-f2d1b4a",
63
+ "expo-media-library": "18.3.0-canary-20251008-f2d1b4a",
64
+ "expo-mesh-gradient": "0.4.8-canary-20251008-f2d1b4a",
65
+ "expo-module-template": "11.0.16-canary-20251008-f2d1b4a",
66
+ "expo-modules-core": "3.1.0-canary-20251008-f2d1b4a",
67
+ "expo-navigation-bar": "5.0.9-canary-20251008-f2d1b4a",
68
+ "expo-network": "8.0.8-canary-20251008-f2d1b4a",
69
+ "expo-notifications": "1.0.0-canary-20251008-f2d1b4a",
70
+ "expo-print": "15.0.8-canary-20251008-f2d1b4a",
71
+ "expo-live-photo": "1.0.8-canary-20251008-f2d1b4a",
72
+ "expo-router": "6.1.0-canary-20251008-f2d1b4a",
73
+ "expo-screen-capture": "8.0.9-canary-20251008-f2d1b4a",
74
+ "expo-screen-orientation": "9.0.8-canary-20251008-f2d1b4a",
75
+ "expo-secure-store": "15.0.8-canary-20251008-f2d1b4a",
76
+ "expo-sensors": "15.0.8-canary-20251008-f2d1b4a",
77
+ "expo-sharing": "14.0.8-canary-20251008-f2d1b4a",
78
+ "expo-sms": "14.0.8-canary-20251008-f2d1b4a",
79
+ "expo-speech": "14.0.8-canary-20251008-f2d1b4a",
80
+ "expo-splash-screen": "31.0.11-canary-20251008-f2d1b4a",
81
+ "expo-sqlite": "16.0.9-canary-20251008-f2d1b4a",
82
+ "expo-status-bar": "3.0.9-canary-20251008-f2d1b4a",
83
+ "expo-store-review": "9.0.9-canary-20251008-f2d1b4a",
84
+ "expo-symbols": "1.1.0-canary-20251008-f2d1b4a",
85
+ "expo-system-ui": "6.0.8-canary-20251008-f2d1b4a",
86
+ "expo-task-manager": "14.0.8-canary-20251008-f2d1b4a",
87
+ "expo-tracking-transparency": "6.0.8-canary-20251008-f2d1b4a",
88
+ "expo-updates": "29.1.0-canary-20251008-f2d1b4a",
89
+ "expo-video-thumbnails": "10.0.8-canary-20251008-f2d1b4a",
90
+ "expo-video": "3.0.12-canary-20251008-f2d1b4a",
91
+ "expo-web-browser": "15.0.9-canary-20251008-f2d1b4a",
92
+ "jest-expo": "55.0.0-canary-20251008-f2d1b4a",
93
93
  "lottie-react-native": "~7.3.1",
94
94
  "react": "19.1.1",
95
95
  "react-dom": "19.1.1",
@@ -108,10 +108,10 @@
108
108
  "react-native-view-shot": "4.0.3",
109
109
  "react-native-webview": "13.15.0",
110
110
  "sentry-expo": "~7.0.0",
111
- "unimodules-app-loader": "6.0.8-canary-20251008-6acbc1c",
111
+ "unimodules-app-loader": "6.0.8-canary-20251008-f2d1b4a",
112
112
  "unimodules-image-loader-interface": "~6.1.0",
113
113
  "@shopify/react-native-skia": "2.2.12",
114
114
  "@shopify/flash-list": "2.0.2",
115
- "@sentry/react-native": "~7.1.0",
115
+ "@sentry/react-native": "~7.2.0",
116
116
  "react-native-bootsplash": "^6.3.10"
117
117
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo",
3
- "version": "55.0.0-canary-20251008-6acbc1c",
3
+ "version": "55.0.0-canary-20251008-f2d1b4a",
4
4
  "description": "The Expo SDK",
5
5
  "main": "src/Expo.ts",
6
6
  "module": "src/Expo.ts",
@@ -75,24 +75,24 @@
75
75
  "homepage": "https://github.com/expo/expo/tree/main/packages/expo",
76
76
  "dependencies": {
77
77
  "@babel/runtime": "^7.20.0",
78
- "@expo/cli": "54.1.0-canary-20251008-6acbc1c",
79
- "@expo/config": "12.0.11-canary-20251008-6acbc1c",
80
- "@expo/config-plugins": "54.0.3-canary-20251008-6acbc1c",
81
- "@expo/devtools": "0.1.8-canary-20251008-6acbc1c",
82
- "@expo/fingerprint": "0.15.2-canary-20251008-6acbc1c",
78
+ "@expo/cli": "54.1.0-canary-20251008-f2d1b4a",
79
+ "@expo/config": "12.0.11-canary-20251008-f2d1b4a",
80
+ "@expo/config-plugins": "54.0.3-canary-20251008-f2d1b4a",
81
+ "@expo/devtools": "0.1.8-canary-20251008-f2d1b4a",
82
+ "@expo/fingerprint": "0.15.2-canary-20251008-f2d1b4a",
83
83
  "@expo/metro": "~54.0.0",
84
- "@expo/metro-config": "54.0.7-canary-20251008-6acbc1c",
84
+ "@expo/metro-config": "54.0.7-canary-20251008-f2d1b4a",
85
85
  "@expo/vector-icons": "^15.0.2",
86
- "@expo/log-box": "0.0.13-canary-20251008-6acbc1c",
86
+ "@expo/log-box": "0.0.13-canary-20251008-f2d1b4a",
87
87
  "@ungap/structured-clone": "^1.3.0",
88
- "babel-preset-expo": "54.0.4-canary-20251008-6acbc1c",
89
- "expo-asset": "12.0.10-canary-20251008-6acbc1c",
90
- "expo-constants": "18.0.10-canary-20251008-6acbc1c",
91
- "expo-file-system": "19.0.17-canary-20251008-6acbc1c",
92
- "expo-font": "14.0.9-canary-20251008-6acbc1c",
93
- "expo-keep-awake": "15.0.8-canary-20251008-6acbc1c",
94
- "expo-modules-autolinking": "3.1.0-canary-20251008-6acbc1c",
95
- "expo-modules-core": "3.1.0-canary-20251008-6acbc1c",
88
+ "babel-preset-expo": "54.0.4-canary-20251008-f2d1b4a",
89
+ "expo-asset": "12.0.10-canary-20251008-f2d1b4a",
90
+ "expo-constants": "18.0.10-canary-20251008-f2d1b4a",
91
+ "expo-file-system": "19.0.17-canary-20251008-f2d1b4a",
92
+ "expo-font": "14.0.9-canary-20251008-f2d1b4a",
93
+ "expo-keep-awake": "15.0.8-canary-20251008-f2d1b4a",
94
+ "expo-modules-autolinking": "3.1.0-canary-20251008-f2d1b4a",
95
+ "expo-modules-core": "3.1.0-canary-20251008-f2d1b4a",
96
96
  "pretty-format": "^29.7.0",
97
97
  "react-refresh": "^0.14.2",
98
98
  "whatwg-url-without-unicode": "8.0.0-3"
@@ -101,15 +101,15 @@
101
101
  "@types/node": "^22.14.0",
102
102
  "@types/react": "~19.1.10",
103
103
  "@types/react-test-renderer": "~19.1.0",
104
- "expo-module-scripts": "5.0.8-canary-20251008-6acbc1c",
104
+ "expo-module-scripts": "5.0.8-canary-20251008-f2d1b4a",
105
105
  "react": "19.1.1",
106
106
  "react-dom": "19.1.1",
107
107
  "react-native": "0.82.0-rc.5",
108
108
  "web-streams-polyfill": "^3.3.2"
109
109
  },
110
110
  "peerDependencies": {
111
- "@expo/dom-webview": "0.2.8-canary-20251008-6acbc1c",
112
- "@expo/metro-runtime": "6.1.3-canary-20251008-6acbc1c",
111
+ "@expo/dom-webview": "0.2.8-canary-20251008-f2d1b4a",
112
+ "@expo/metro-runtime": "6.1.3-canary-20251008-f2d1b4a",
113
113
  "react": "*",
114
114
  "react-native": "*",
115
115
  "react-native-webview": "*"
@@ -1,15 +1,15 @@
1
1
  // Entry file for a DOM Component.
2
2
  import '@expo/metro-runtime';
3
3
 
4
+ import { setupLogBox } from '@expo/log-box';
4
5
  import React from 'react';
5
6
 
6
7
  import { JSONValue } from './dom.types';
7
8
  import { addEventListener, getActionsObject } from './marshal';
8
9
  import registerRootComponent from '../launch/registerRootComponent';
9
- import { useLogBox } from '@expo/log-box';
10
10
 
11
11
  interface MarshalledProps {
12
- name: string[];
12
+ names: string[];
13
13
  props: Record<string, JSONValue>;
14
14
  [key: string]: undefined | JSONValue;
15
15
  }
@@ -92,7 +92,7 @@ export function registerDOMComponent(AppModule: any) {
92
92
  // Create a named map { [name: string]: ProxyFunction }
93
93
  // TODO(@kitten): Unclear how this is typed or shaped
94
94
  return Object.fromEntries(
95
- (marshalledProps.names as string[]).map((key: string) => {
95
+ marshalledProps.names.map((key: string) => {
96
96
  return [key, ACTIONS[key]];
97
97
  })
98
98
  );
@@ -103,7 +103,7 @@ export function registerDOMComponent(AppModule: any) {
103
103
 
104
104
  try {
105
105
  if (process.env.NODE_ENV !== 'production') {
106
- useLogBox();
106
+ setupLogBox();
107
107
  }
108
108
 
109
109
  React.startTransition(() => {
@@ -3,6 +3,7 @@ import React from 'react';
3
3
  import { AppState } from 'react-native';
4
4
 
5
5
  import { getBaseURL } from './base';
6
+ import { DOMPropsInternal } from './dom-internal.types';
6
7
  import type { BridgeMessage, WebViewProps, WebViewRef } from './dom.types';
7
8
  import { _emitGlobalEvent } from './global-events';
8
9
  import {
@@ -16,7 +17,6 @@ import {
16
17
  import ExpoDomWebView from './webview/ExpoDOMWebView';
17
18
  import RNWebView from './webview/RNWebView';
18
19
  import { useDebugZeroHeight } from './webview/useDebugZeroHeight';
19
- import { DOMPropsInternal } from './dom-internal.types';
20
20
 
21
21
  type RawWebViewProps = React.ComponentProps<Exclude<typeof ExpoDomWebView, undefined>> &
22
22
  React.ComponentProps<Exclude<typeof RNWebView, undefined>>;
package/template.tgz CHANGED
Binary file
@@ -1,51 +0,0 @@
1
- package expo.modules
2
-
3
- import android.app.Application
4
- import android.content.Context
5
- import com.facebook.react.ReactHost
6
- import com.facebook.react.ReactNativeHost
7
- import com.facebook.react.ReactPackageTurboModuleManagerDelegate
8
- import com.facebook.react.bridge.UIManagerProvider
9
- import com.facebook.react.common.SurfaceDelegateFactory
10
- import com.facebook.react.devsupport.DevSupportManagerFactory
11
- import com.facebook.react.devsupport.interfaces.RedBoxHandler
12
-
13
- class ReactNativeHostWrapper(
14
- application: Application,
15
- host: ReactNativeHost
16
- ) : ReactNativeHostWrapperBase(application, host) {
17
- override fun getDevSupportManagerFactory(): DevSupportManagerFactory? {
18
- return reactNativeHostHandlers
19
- .asSequence()
20
- .mapNotNull { it.devSupportManagerFactory }
21
- .firstOrNull() as DevSupportManagerFactory?
22
- ?: invokeDelegateMethod("getDevSupportManagerFactory")
23
- }
24
-
25
- override fun getReactPackageTurboModuleManagerDelegateBuilder(): ReactPackageTurboModuleManagerDelegate.Builder? {
26
- return invokeDelegateMethod("getReactPackageTurboModuleManagerDelegateBuilder")
27
- }
28
-
29
- override fun getUIManagerProvider(): UIManagerProvider? {
30
- return invokeDelegateMethod("getUIManagerProvider")
31
- }
32
-
33
- override fun getShouldRequireActivity(): Boolean {
34
- return host.shouldRequireActivity
35
- }
36
-
37
- override fun getSurfaceDelegateFactory(): SurfaceDelegateFactory {
38
- return host.surfaceDelegateFactory
39
- }
40
-
41
- override fun getRedBoxHandler(): RedBoxHandler? {
42
- return invokeDelegateMethod("getRedBoxHandler")
43
- }
44
-
45
- companion object {
46
- @JvmStatic
47
- fun createReactHost(context: Context, reactNativeHost: ReactNativeHost): ReactHost {
48
- return ExpoReactHostFactory.createFromReactNativeHost(context, reactNativeHost)
49
- }
50
- }
51
- }
@@ -1,107 +0,0 @@
1
- package expo.modules
2
-
3
- import android.app.Application
4
- import androidx.collection.ArrayMap
5
- import com.facebook.react.ReactInstanceEventListener
6
- import com.facebook.react.ReactInstanceManager
7
- import com.facebook.react.ReactNativeHost
8
- import com.facebook.react.ReactPackage
9
- import com.facebook.react.bridge.JavaScriptExecutorFactory
10
- import com.facebook.react.bridge.ReactContext
11
- import com.facebook.react.defaults.DefaultReactNativeHost
12
- import java.lang.reflect.Method
13
-
14
- open class ReactNativeHostWrapperBase(
15
- application: Application,
16
- protected val host: ReactNativeHost
17
- ) : DefaultReactNativeHost(application) {
18
-
19
- val reactNativeHostHandlers = ExpoModulesPackage.packageList
20
- .flatMap { it.createReactNativeHostHandlers(application) }
21
- private val methodMap: ArrayMap<String, Method> = ArrayMap()
22
-
23
- override fun createReactInstanceManager(): ReactInstanceManager {
24
- val developerSupport = useDeveloperSupport
25
- reactNativeHostHandlers.forEach { handler ->
26
- handler.onWillCreateReactInstance(developerSupport)
27
- }
28
-
29
- val result = super.createReactInstanceManager()
30
-
31
- reactNativeHostHandlers.forEach { handler ->
32
- handler.onDidCreateDevSupportManager(result.devSupportManager)
33
- }
34
-
35
- result.addReactInstanceEventListener(object : ReactInstanceEventListener {
36
- override fun onReactContextInitialized(context: ReactContext) {
37
- reactNativeHostHandlers.forEach { handler ->
38
- handler.onDidCreateReactInstance(developerSupport, context)
39
- }
40
- }
41
- })
42
-
43
- injectHostReactInstanceManager(result)
44
-
45
- return result
46
- }
47
-
48
- override fun getJavaScriptExecutorFactory(): JavaScriptExecutorFactory? {
49
- return reactNativeHostHandlers.asSequence()
50
- .mapNotNull { it.javaScriptExecutorFactory }
51
- .firstOrNull() ?: invokeDelegateMethod("getJavaScriptExecutorFactory")
52
- }
53
-
54
- public override fun getJSMainModuleName(): String {
55
- return invokeDelegateMethod("getJSMainModuleName")
56
- }
57
-
58
- public override fun getJSBundleFile(): String? {
59
- return reactNativeHostHandlers.asSequence()
60
- .mapNotNull { it.getJSBundleFile(useDeveloperSupport) }
61
- .firstOrNull() ?: invokeDelegateMethod("getJSBundleFile")
62
- }
63
-
64
- public override fun getBundleAssetName(): String? {
65
- return reactNativeHostHandlers.asSequence()
66
- .mapNotNull { it.getBundleAssetName(useDeveloperSupport) }
67
- .firstOrNull() ?: invokeDelegateMethod("getBundleAssetName")
68
- }
69
-
70
- override fun getUseDeveloperSupport(): Boolean {
71
- return reactNativeHostHandlers.asSequence()
72
- .mapNotNull { it.useDeveloperSupport }
73
- .firstOrNull() ?: host.useDeveloperSupport
74
- }
75
-
76
- public override fun getPackages(): MutableList<ReactPackage> {
77
- return invokeDelegateMethod("getPackages")
78
- }
79
-
80
- //endregion
81
-
82
- //region Internals
83
-
84
- // this is to call the methods as overridden in MainApplication.kt
85
- @Suppress("UNCHECKED_CAST")
86
- internal fun <T> invokeDelegateMethod(name: String): T {
87
- var method = methodMap[name]
88
- if (method == null) {
89
- method = ReactNativeHost::class.java.getDeclaredMethod(name)
90
- method.isAccessible = true
91
- methodMap[name] = method
92
- }
93
- return method!!.invoke(host) as T
94
- }
95
-
96
- /**
97
- * Inject the @{ReactInstanceManager} from the wrapper to the wrapped host.
98
- * In case the wrapped host to call `getReactInstanceManager` inside its methods.
99
- */
100
- private fun injectHostReactInstanceManager(reactInstanceManager: ReactInstanceManager) {
101
- val mReactInstanceManagerField = ReactNativeHost::class.java.getDeclaredField("mReactInstanceManager")
102
- mReactInstanceManagerField.isAccessible = true
103
- mReactInstanceManagerField.set(host, reactInstanceManager)
104
- }
105
-
106
- //endregion
107
- }