expo-modules-core 3.0.24 → 3.0.26
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 +12 -0
- package/android/build.gradle +2 -2
- package/ios/Core/Views/SwiftUI/ExpoSwiftUI.swift +11 -0
- package/ios/Core/Views/SwiftUI/SwiftUIViewHost.swift +18 -0
- package/ios/Core/Views/SwiftUI/SwiftUIVirtualView.swift +9 -0
- package/ios/Core/Views/SwiftUI/SwiftUIVirtualViewObjC.h +2 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,18 @@
|
|
|
10
10
|
|
|
11
11
|
### 💡 Others
|
|
12
12
|
|
|
13
|
+
## 3.0.26 — 2025-11-17
|
|
14
|
+
|
|
15
|
+
### 🐛 Bug fixes
|
|
16
|
+
|
|
17
|
+
- [iOS] Fix `TextField` causing crash when reload and unmounting. ([#40960](https://github.com/expo/expo/pull/40960) by [@nishan](https://github.com/intergalacticspacehighway))
|
|
18
|
+
|
|
19
|
+
## 3.0.25 — 2025-11-07
|
|
20
|
+
|
|
21
|
+
### 🐛 Bug fixes
|
|
22
|
+
|
|
23
|
+
- [iOS] Fix sizing glitch when React Native components are used as child in Expo UI components ([#40693](https://github.com/expo/expo/pull/40693) by [@nishan](https://github.com/intergalacticspacehighway))
|
|
24
|
+
|
|
13
25
|
## 3.0.24 — 2025-11-03
|
|
14
26
|
|
|
15
27
|
### 🎉 New features
|
package/android/build.gradle
CHANGED
|
@@ -29,7 +29,7 @@ if (shouldIncludeCompose) {
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
group = 'host.exp.exponent'
|
|
32
|
-
version = '3.0.
|
|
32
|
+
version = '3.0.26'
|
|
33
33
|
|
|
34
34
|
def isExpoModulesCoreTests = {
|
|
35
35
|
Gradle gradle = getGradle()
|
|
@@ -79,7 +79,7 @@ android {
|
|
|
79
79
|
defaultConfig {
|
|
80
80
|
consumerProguardFiles 'proguard-rules.pro'
|
|
81
81
|
versionCode 1
|
|
82
|
-
versionName "3.0.
|
|
82
|
+
versionName "3.0.26"
|
|
83
83
|
buildConfigField "String", "EXPO_MODULES_CORE_VERSION", "\"${versionName}\""
|
|
84
84
|
buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled.toString()
|
|
85
85
|
|
|
@@ -4,3 +4,14 @@
|
|
|
4
4
|
A namespace for Expo APIs that deal with SwiftUI.
|
|
5
5
|
*/
|
|
6
6
|
public struct ExpoSwiftUI {}
|
|
7
|
+
|
|
8
|
+
extension ExpoSwiftUI {
|
|
9
|
+
/**
|
|
10
|
+
Protocol for SwiftUI views that can receive focus (e.g., TextField, SecureField)
|
|
11
|
+
Used to resign first responder before view recycling to prevent first responder resign crash
|
|
12
|
+
*/
|
|
13
|
+
// https://github.com/expo/expo/issues/40354
|
|
14
|
+
public protocol FocusableView {
|
|
15
|
+
func forceResignFirstResponder()
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -13,6 +13,7 @@ extension ExpoSwiftUI {
|
|
|
13
13
|
|
|
14
14
|
#if os(macOS)
|
|
15
15
|
func makeNSView(context: Context) -> NSView {
|
|
16
|
+
context.coordinator.originalAutoresizingMask = view.autoresizingMask
|
|
16
17
|
return view
|
|
17
18
|
}
|
|
18
19
|
|
|
@@ -22,6 +23,7 @@ extension ExpoSwiftUI {
|
|
|
22
23
|
#endif
|
|
23
24
|
|
|
24
25
|
func makeUIView(context: Context) -> UIView {
|
|
26
|
+
context.coordinator.originalAutoresizingMask = view.autoresizingMask
|
|
25
27
|
return view
|
|
26
28
|
}
|
|
27
29
|
|
|
@@ -29,6 +31,22 @@ extension ExpoSwiftUI {
|
|
|
29
31
|
// Nothing to do here
|
|
30
32
|
}
|
|
31
33
|
|
|
34
|
+
static func dismantleUIView(_ uiView: UIView, coordinator: Coordinator) {
|
|
35
|
+
// https://github.com/expo/expo/issues/40604
|
|
36
|
+
// UIViewRepresentable attaches autoresizingMask w+h to the hosted UIView
|
|
37
|
+
// This causes issues for RN views when they are recycled.
|
|
38
|
+
// So we restore the original autoresizingMask to avoid issues.
|
|
39
|
+
uiView.autoresizingMask = coordinator.originalAutoresizingMask
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
func makeCoordinator() -> Coordinator {
|
|
43
|
+
Coordinator()
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
class Coordinator {
|
|
47
|
+
var originalAutoresizingMask: UIView.AutoresizingMask = []
|
|
48
|
+
}
|
|
49
|
+
|
|
32
50
|
// MARK: - AnyChild implementations
|
|
33
51
|
|
|
34
52
|
var childView: some SwiftUI.View {
|
|
@@ -154,6 +154,15 @@ extension ExpoSwiftUI {
|
|
|
154
154
|
|
|
155
155
|
// MARK: - Privates
|
|
156
156
|
|
|
157
|
+
override func removeFromSuperview() {
|
|
158
|
+
// When the view is unmounted, the focus on TextFieldView stays active and it causes a crash, so we blur it here
|
|
159
|
+
// UIView does something similar to resign the first responder in removeFromSuperview, so we do the same for our virtual view
|
|
160
|
+
if let focusableView = contentView as? any ExpoSwiftUI.FocusableView {
|
|
161
|
+
focusableView.forceResignFirstResponder()
|
|
162
|
+
}
|
|
163
|
+
super.removeFromSuperview()
|
|
164
|
+
}
|
|
165
|
+
|
|
157
166
|
/**
|
|
158
167
|
Installs convenient event dispatchers for declared events, so the view can just invoke the block to dispatch the proper event.
|
|
159
168
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-modules-core",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.26",
|
|
4
4
|
"description": "The core of Expo Modules architecture",
|
|
5
5
|
"main": "src/index.ts",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -65,5 +65,5 @@
|
|
|
65
65
|
"@testing-library/react-native": "^13.2.0",
|
|
66
66
|
"expo-module-scripts": "^5.0.7"
|
|
67
67
|
},
|
|
68
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "6d7c221dc8a1994043c4f2ddcf33a16bf3e508dc"
|
|
69
69
|
}
|