expo-modules-core 57.0.15 → 57.0.17

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.
package/CHANGELOG.md CHANGED
@@ -10,6 +10,16 @@
10
10
 
11
11
  ### 💡 Others
12
12
 
13
+ ## 57.0.17 — 2026-09-08
14
+
15
+ ### 🐛 Bug fixes
16
+
17
+ - [iOS] Fixed the tap that closes a SwiftUI menu still sending `touchStart`, `onPressIn` and `onPressOut` to the React Native view underneath it. React Native's touch handler is now told to skip that tap before UIKit delivers it, instead of being cancelled afterwards. ([#48419](https://github.com/expo/expo/issues/48419) by [@nahooni0511](https://github.com/nahooni0511), [#49775](https://github.com/expo/expo/pull/49775) by [@intergalacticspacehighway](https://github.com/intergalacticspacehighway))
18
+
19
+ ## 57.0.16 — 2026-09-04
20
+
21
+ _This version does not introduce any user-facing changes._
22
+
13
23
  ## 57.0.15 — 2026-09-01
14
24
 
15
25
  ### 🐛 Bug fixes
@@ -27,7 +27,7 @@ if (shouldIncludeCompose) {
27
27
  }
28
28
 
29
29
  group = 'host.exp.exponent'
30
- version = '57.0.15'
30
+ version = '57.0.17'
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 "57.0.15"
97
+ versionName "57.0.17"
98
98
  buildConfigField "String", "EXPO_MODULES_CORE_VERSION", "\"${versionName}\""
99
99
  buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", "true"
100
100
 
@@ -10,13 +10,15 @@ import UIKit.UIGestureRecognizerSubclass
10
10
  Menu when opened attaches a container view `_UIContextMenuContainerView` to the window.
11
11
  On tapping it, React Root's `RCTSurfaceTouchHandler` also listens to the touch and causes Pressables to fire onPress.
12
12
  */
13
- internal final class SystemMenuTouchGate: UIGestureRecognizer {
13
+ internal final class SystemMenuTouchGate: UIGestureRecognizer, UIGestureRecognizerDelegate {
14
14
  init() {
15
15
  super.init(target: nil, action: nil)
16
16
  // Both default to true. Never hold a touch back, and never let React Native's handler see a
17
17
  // reason to cancel: it calls `_cancelTouches` for any outside recognizer that cancels in view.
18
18
  delaysTouchesEnded = false
19
19
  cancelsTouchesInView = false
20
+ // UIKit asks a recognizer's delegate about an event before it delivers that event's touches.
21
+ delegate = self
20
22
  }
21
23
 
22
24
  // MARK: - Detecting an open menu
@@ -109,18 +111,37 @@ internal final class SystemMenuTouchGate: UIGestureRecognizer {
109
111
  window.addGestureRecognizer(SystemMenuTouchGate())
110
112
  }
111
113
 
114
+ /**
115
+ Tells React Native's handlers to skip these touches while a menu is open. UIKit then delivers
116
+ neither `touchesBegan` nor `touchesEnded` for them, so JS sees no `touchStart`, no press and no
117
+ `touchEnd`. A handler that already registered a touch cancels it from `reset` at sequence end.
118
+ */
119
+ private func detachSurfaceTouchHandlers(from touches: Set<UITouch>, for event: UIEvent) {
120
+ guard let window = view as? UIWindow, Self.isShowingContextMenu(in: window) else {
121
+ return
122
+ }
123
+ for touch in touches {
124
+ for handler in Self.surfaceTouchHandlers(above: touch.view) {
125
+ handler.ignore(touch, for: event)
126
+ }
127
+ }
128
+ }
129
+
130
+ // MARK: - UIGestureRecognizerDelegate
131
+
132
+ func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldReceive event: UIEvent) -> Bool {
133
+ if let touches = event.allTouches {
134
+ detachSurfaceTouchHandlers(from: touches.filter { $0.phase == .began }, for: event)
135
+ }
136
+ return true
137
+ }
138
+
112
139
  // MARK: - UIGestureRecognizer
113
140
 
114
141
  override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent) {
115
142
  super.touchesBegan(touches, with: event)
116
-
117
- if let window = view as? UIWindow, Self.isShowingContextMenu(in: window) {
118
- for touch in touches {
119
- for handler in Self.surfaceTouchHandlers(above: touch.view) {
120
- handler.ignore(touch, for: event)
121
- }
122
- }
123
- }
143
+ // Second chance in case React Native's handler received the touch before the delegate ran.
144
+ detachSurfaceTouchHandlers(from: touches, for: event)
124
145
  state = .failed
125
146
  }
126
147
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-modules-core",
3
- "version": "57.0.15",
3
+ "version": "57.0.17",
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.6.1",
50
- "expo-modules-jsi": "~57.0.7",
50
+ "expo-modules-jsi": "~57.1.0",
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.3"
68
68
  },
69
- "gitHead": "b76ecf192c5325793bcea31dd9bb8efd91f9ad7f",
69
+ "gitHead": "ee89f7c31877f111cb1705c8e5c2c8078fa80a03",
70
70
  "scripts": {
71
71
  "build": "expo-module build",
72
72
  "clean": "expo-module clean",
package/spm.config.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "name": "ExpoModulesCore",
6
6
  "podName": "ExpoModulesCore",
7
7
  "platforms": [
8
- "iOS(.v16)"
8
+ "iOS(\"16.4\")"
9
9
  ],
10
10
  "externalDependencies": [
11
11
  "ReactNativeDependencies",
@@ -117,7 +117,7 @@
117
117
  "name": "ExpoModulesWorklets",
118
118
  "podName": "ExpoModulesWorklets",
119
119
  "platforms": [
120
- "iOS(.v16)"
120
+ "iOS(\"16.4\")"
121
121
  ],
122
122
  "externalDependencies": [
123
123
  "ReactNativeDependencies",
@@ -175,7 +175,7 @@
175
175
  "podName": "ExpoModulesWorkletsAdapter",
176
176
  "sourceOnly": true,
177
177
  "platforms": [
178
- "iOS(.v16)"
178
+ "iOS(\"16.4\")"
179
179
  ],
180
180
  "autolinkWhen": {
181
181
  "podName": "RNWorklets"