Skip to content

Commit 3cbe24e

Browse files
Merge pull request #30 from mendix/moo/MOO-2245-upgrade-rn-to083
[MOO-2245] upgrade react native to v0.83
2 parents 08f18f5 + dbd1b2c commit 3cbe24e

26 files changed

Lines changed: 4016 additions & 3655 deletions

.github/CI_DOCUMENTATION.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ All workflows use standardized tooling versions to ensure consistency:
1616

1717
### Core Tools
1818

19-
| Tool | Version | Defined In |
20-
| ---------------- | -------- | ----------------------------- |
21-
| **Node.js** | `24` | `.nvmrc` |
22-
| **Yarn** | `4.12.0` | `package.json#packageManager` |
23-
| **React Native** | `0.78.2` | `package.json` |
24-
| **React** | `19.0.0` | `package.json` |
25-
| **TypeScript** | `5.9.2` | `package.json` |
19+
| Tool | Version | Defined In |
20+
| ---------------- | --------- | ----------------------------- |
21+
| **Node.js** | `24` | `.nvmrc` |
22+
| **Yarn** | `4.12.0` | `package.json#packageManager` |
23+
| **React Native** | `0.83.4` | `package.json` |
24+
| **React** | `19.2.14` | `package.json` |
25+
| **TypeScript** | `5.9.3` | `package.json` |
2626

2727
### Android Tooling
2828

@@ -57,7 +57,7 @@ All workflows use standardized tooling versions to ensure consistency:
5757
| ------------------------ | --------------------- | ----------------------- |
5858
| **React Native Harness** | `1.0.0-alpha.21` | `package.json` |
5959
| **Android Emulator** | Pixel_API_35 (API 35) | `rn-harness.config.mjs` |
60-
| **iOS Simulator** | iPhone 17 (iOS 26.2) | `rn-harness.config.mjs` |
60+
| **iOS Simulator** | iPhone 17 (iOS 26.2) | `rn-harness.config.mjs` |
6161

6262
### GitHub Actions
6363

.yarn/patches/@op-engineering-op-sqlite-npm-15.0.7-39fbf4933a.patch renamed to .yarn/patches/@op-engineering-op-sqlite-npm-15.2.5-936f5cf3a5.patch

Lines changed: 68 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
diff --git a/android/build.gradle b/android/build.gradle
2-
index d36fd855813e87b17da43156be64782b325b2733..751355645c0b6e28e2df01e9bdc32f545d8dc83c 100644
2+
index 08631df..9ef3a95 100644
33
--- a/android/build.gradle
44
+++ b/android/build.gradle
55
@@ -1,5 +1,4 @@
@@ -8,7 +8,7 @@ index d36fd855813e87b17da43156be64782b325b2733..751355645c0b6e28e2df01e9bdc32f54
88

99
buildscript {
1010
ext.getExtOrDefault = {name ->
11-
@@ -27,57 +26,16 @@ def getExtOrIntegerDefault(name) {
11+
@@ -27,56 +26,16 @@ def getExtOrIntegerDefault(name) {
1212
return rootProject.ext.has(name) ? rootProject.ext.get(name) : (project.properties["OPSQLite_" + name]).toInteger()
1313
}
1414

@@ -33,7 +33,7 @@ index d36fd855813e87b17da43156be64782b325b2733..751355645c0b6e28e2df01e9bdc32f54
3333
- // Start from the root + 1 level up (to avoid detecting the op-sqlite/package.json) and traverse upwards to find the first package.json
3434
- File currentDir = new File("$rootDir/../")
3535
- packageJsonFile = null
36-
-
36+
-
3737
- // Try to find package.json by traversing upwards
3838
- while (currentDir != null) {
3939
- File potential = new File(currentDir, "package.json")
@@ -54,22 +54,21 @@ index d36fd855813e87b17da43156be64782b325b2733..751355645c0b6e28e2df01e9bdc32f54
5454
-
5555
-if(opsqliteConfig) {
5656
- println "[OP-SQLITE] Detected op-sqlite config from package.json at: " + packageJsonFile.absolutePath
57-
- useSQLCipher = opsqliteConfig["sqlcipher"]
58-
- useCRSQLite = opsqliteConfig["crsqlite"]
59-
- useSqliteVec = opsqliteConfig["sqliteVec"]
57+
- useSQLCipher = !!opsqliteConfig["sqlcipher"]
58+
- useCRSQLite = !!opsqliteConfig["crsqlite"]
59+
- useSqliteVec = !!opsqliteConfig["sqliteVec"]
6060
- performanceMode = opsqliteConfig["performanceMode"]
6161
- sqliteFlags = opsqliteConfig["sqliteFlags"] ? opsqliteConfig["sqliteFlags"] : ""
62-
- enableFTS5 = opsqliteConfig["fts5"]
63-
- useLibsql = opsqliteConfig["libsql"]
64-
- enableRtree = opsqliteConfig["rtree"]
62+
- enableFTS5 = !!opsqliteConfig["fts5"]
63+
- useLibsql = !!opsqliteConfig["libsql"]
64+
- enableRtree = !!opsqliteConfig["rtree"]
6565
- tokenizers = opsqliteConfig["tokenizers"] ? opsqliteConfig["tokenizers"] : []
6666
-}
67-
-
67+
6868
if(useSQLCipher) {
6969
println "[OP-SQLITE] using sqlcipher."
70-
} else if(useLibsql) {
7170
diff --git a/android/cpp-adapter.cpp b/android/cpp-adapter.cpp
72-
index 8feaf7719661ef248113f11b1643deedb4b510af..2393963bf982f80ccff2ed396f1538be7ee18fcb 100644
71+
index 5912d7b..495880e 100644
7372
--- a/android/cpp-adapter.cpp
7473
+++ b/android/cpp-adapter.cpp
7574
@@ -19,8 +19,8 @@ struct OPSQLiteBridge : jni::JavaClass<OPSQLiteBridge> {
@@ -95,7 +94,7 @@ index 8feaf7719661ef248113f11b1643deedb4b510af..2393963bf982f80ccff2ed396f1538be
9594

9695
JNIEXPORT jint JNI_OnLoad(JavaVM *vm, void *) {
9796
diff --git a/android/src/main/java/com/op/sqlite/OPSQLiteBridge.kt b/android/src/main/java/com/op/sqlite/OPSQLiteBridge.kt
98-
index 44f86df6a21a6f7272b2c79b196586ef8fec886b..9d9f7100fd34361701b2addf09a4f36e33b35d56 100644
97+
index 44f86df..8c003db 100644
9998
--- a/android/src/main/java/com/op/sqlite/OPSQLiteBridge.kt
10099
+++ b/android/src/main/java/com/op/sqlite/OPSQLiteBridge.kt
101100
@@ -12,6 +12,7 @@ class OPSQLiteBridge {
@@ -110,49 +109,50 @@ index 44f86df6a21a6f7272b2c79b196586ef8fec886b..9d9f7100fd34361701b2addf09a4f36e
110109
clearStateNativeJsi()
111110
}
112111

113-
+ fun deleteAllDBs() {
114-
+ deleteAllDBsJsi()
112+
+ fun deleteAllDBs(): Boolean {
113+
+ return deleteAllDBsJsi()
115114
+ }
116115
+
117116
companion object {
118117
val instance = OPSQLiteBridge()
119118
}
120119
diff --git a/android/src/main/java/com/op/sqlite/OPSQLiteModule.kt b/android/src/main/java/com/op/sqlite/OPSQLiteModule.kt
121-
index 688832fa2f9a7f91d16cd50495caa8c9f8873864..9ea814bfa63f27356e804b82e941b7121152db3a 100644
120+
index 8d341b7..33d3d7d 100644
122121
--- a/android/src/main/java/com/op/sqlite/OPSQLiteModule.kt
123122
+++ b/android/src/main/java/com/op/sqlite/OPSQLiteModule.kt
124-
@@ -13,7 +13,7 @@ import java.io.OutputStream
123+
@@ -12,7 +12,7 @@ import java.io.InputStream
124+
import java.io.OutputStream
125125
import com.facebook.react.util.RNLog;
126126

127-
//@ReactModule(name = OPSQLiteModule.NAME)
128127
-internal class OPSQLiteModule(context: ReactApplicationContext?) : ReactContextBaseJavaModule(context) {
129128
+class OPSQLiteModule(context: ReactApplicationContext?) : ReactContextBaseJavaModule(context) {
130129
override fun getName(): String {
131130
return NAME
132131
}
133-
@@ -56,6 +56,17 @@ internal class OPSQLiteModule(context: ReactApplicationContext?) : ReactContextB
134-
return true
132+
@@ -54,6 +54,18 @@ internal class OPSQLiteModule(context: ReactApplicationContext?) : ReactContextB
133+
throw Exception("Do not call getDylibPath on Android")
135134
}
136135

137136
+ @ReactMethod(isBlockingSynchronousMethod = true)
138-
+ fun closeAllConnections() {
137+
+ fun closeAllConnections(): Boolean {
139138
+ OPSQLiteBridge.instance.invalidate()
139+
+ return true
140140
+ }
141141
+
142142
+ @ReactMethod(isBlockingSynchronousMethod = true)
143-
+ fun deleteAllDBs() {
144-
+ OPSQLiteBridge.instance.deleteAllDBs();
143+
+ fun deleteAllDBs(): Boolean {
144+
+ return OPSQLiteBridge.instance.deleteAllDBs();
145145
+ }
146146
+
147147
+
148148
@ReactMethod
149149
fun moveAssetsDatabase(args: ReadableMap, promise: Promise) {
150150
val filename = args.getString("filename")!!
151151
diff --git a/cpp/DBHostObject.cpp b/cpp/DBHostObject.cpp
152-
index 85710eea286d45685aa526ed3851e8f1e1411039..8cf10f21ba467dea430aab106d43dd4e2adeacd6 100644
152+
index 9682941..c0b9c21 100644
153153
--- a/cpp/DBHostObject.cpp
154154
+++ b/cpp/DBHostObject.cpp
155-
@@ -889,6 +889,10 @@ void DBHostObject::invalidate() {
155+
@@ -682,6 +682,10 @@ void DBHostObject::invalidate() {
156156
#endif
157157
}
158158

@@ -164,23 +164,23 @@ index 85710eea286d45685aa526ed3851e8f1e1411039..8cf10f21ba467dea430aab106d43dd4e
164164

165165
} // namespace opsqlite
166166
diff --git a/cpp/DBHostObject.h b/cpp/DBHostObject.h
167-
index cc174b7c8c5ce500a6ffe5dc6fe092d282d2554c..ff36f742a22b8a84f37d6dd28441dbe9d0c6c873 100644
167+
index 002b8c9..f3a2e1f 100644
168168
--- a/cpp/DBHostObject.h
169169
+++ b/cpp/DBHostObject.h
170-
@@ -73,6 +73,7 @@ class JSI_EXPORT DBHostObject : public jsi::HostObject {
171-
void on_commit();
172-
void on_rollback();
173-
void invalidate();
174-
+ void drop();
175-
~DBHostObject() override;
170+
@@ -68,6 +68,7 @@ public:
171+
void on_commit();
172+
void on_rollback();
173+
void invalidate();
174+
+ void drop();
175+
~DBHostObject() override;
176176

177-
private:
178-
diff --git a/cpp/bindings.cpp b/cpp/bindings.cpp
179-
index 5e1c1de234e7bdb131769728fc862d389f9995a5..dc21c6503ffe18f3ae1cf99f327e8aa1fc587b71 100644
180-
--- a/cpp/bindings.cpp
181-
+++ b/cpp/bindings.cpp
182-
@@ -36,6 +36,13 @@ void invalidate() {
183-
dbs.clear();
177+
private:
178+
diff --git a/cpp/OPSqlite.cpp b/cpp/OPSqlite.cpp
179+
index e33579a..791fa70 100644
180+
--- a/cpp/OPSqlite.cpp
181+
+++ b/cpp/OPSqlite.cpp
182+
@@ -42,6 +42,13 @@ void invalidate() {
183+
dbs.clear();
184184
}
185185

186186
+bool deleteAllDbs() {
@@ -191,12 +191,12 @@ index 5e1c1de234e7bdb131769728fc862d389f9995a5..dc21c6503ffe18f3ae1cf99f327e8aa1
191191
+}
192192
+
193193
void install(jsi::Runtime &rt,
194-
const std::shared_ptr<react::CallInvoker> &invoker,
194+
const std::shared_ptr<react::CallInvoker> &_invoker,
195195
const char *base_path, const char *crsqlite_path,
196-
diff --git a/cpp/bindings.h b/cpp/bindings.h
197-
index 91511ab8dff0cbd34c6b8b844c1783c39d4317cb..cc73dfe4405d568cbfbbfa5a9c879a1d88f260bf 100644
198-
--- a/cpp/bindings.h
199-
+++ b/cpp/bindings.h
196+
diff --git a/cpp/OPSqlite.hpp b/cpp/OPSqlite.hpp
197+
index 91511ab..cc73dfe 100644
198+
--- a/cpp/OPSqlite.hpp
199+
+++ b/cpp/OPSqlite.hpp
200200
@@ -14,6 +14,7 @@ void install(jsi::Runtime &rt,
201201
const char *base_path, const char *crsqlite_path,
202202
const char *sqlite_vec_path);
@@ -206,17 +206,17 @@ index 91511ab8dff0cbd34c6b8b844c1783c39d4317cb..cc73dfe4405d568cbfbbfa5a9c879a1d
206206

207207
} // namespace opsqlite
208208
diff --git a/op-sqlite.podspec b/op-sqlite.podspec
209-
index 375cc3ef0838a3cffb87ec970f636880a8676bb3..e6fce21630ed00aa863f2baae7b3d04de783dcb0 100644
209+
index e717811..147f516 100644
210210
--- a/op-sqlite.podspec
211211
+++ b/op-sqlite.podspec
212212
@@ -1,4 +1,3 @@
213213
-require "json"
214214
require_relative "./generate_tokenizers_header_file"
215215

216216
log_message = lambda do |message|
217-
@@ -39,11 +38,10 @@ else
218-
app_package = JSON.parse(File.read(File.join(__dir__, "example", "package.json")))
219-
end
217+
@@ -38,11 +37,10 @@ end
218+
219+
app_package = JSON.parse(File.read(package_json_path))
220220

221221
-op_sqlite_config = app_package["op-sqlite"]
222222
-use_sqlcipher = false
@@ -228,7 +228,7 @@ index 375cc3ef0838a3cffb87ec970f636880a8676bb3..e6fce21630ed00aa863f2baae7b3d04d
228228
phone_version = false
229229
sqlite_flags = ""
230230
fts5 = false
231-
@@ -51,37 +49,6 @@ rtree = false
231+
@@ -50,36 +48,7 @@ rtree = false
232232
use_sqlite_vec = false
233233
tokenizers = []
234234

@@ -247,22 +247,34 @@ index 375cc3ef0838a3cffb87ec970f636880a8676bb3..e6fce21630ed00aa863f2baae7b3d04d
247247
-
248248
-if phone_version then
249249
- if use_sqlcipher then
250-
- raise "SQLCipher is not supported with phone version"
250+
- raise "SQLCipher is not supported with phone version. It cannot load extensions."
251251
- end
252252
-
253253
- if use_crsqlite then
254-
- raise "CRSQLite is not supported with phone version"
254+
- raise "CRSQLite is not supported with phone version. It cannot load extensions."
255255
- end
256-
-
256+
257257
- if rtree then
258-
- raise "RTree is not supported with phone version"
258+
- raise "RTree is not supported with phone version. It cannot load extensions."
259259
- end
260260
-
261261
- if use_sqlite_vec then
262-
- raise "SQLite Vec is not supported with phone version"
262+
- raise "SQLite Vec is not supported with phone version. It cannot load extensions."
263263
- end
264264
-end
265-
-
265+
266266
Pod::Spec.new do |s|
267267
s.name = "op-sqlite"
268-
s.version = package["version"]
268+
@@ -158,12 +127,6 @@ Pod::Spec.new do |s|
269+
xcconfig[:GCC_PREPROCESSOR_DEFINITIONS] += " SQLITE_ENABLE_RTREE=1"
270+
end
271+
272+
- if phone_version then
273+
- log_message.call("[OP-SQLITE] using iOS embedded SQLite 📱")
274+
- xcconfig[:GCC_PREPROCESSOR_DEFINITIONS] += " OP_SQLITE_USE_PHONE_VERSION=1"
275+
- exclude_files += ["cpp/sqlite3.c", "cpp/sqlite3.h"]
276+
- s.library = "sqlite3"
277+
- end
278+
279+
if performance_mode then
280+
log_message.call("[OP-SQLITE] Performance mode enabled")

CHANGELOG.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@ All notable changes to `mendix-native` package will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8-
98
## [Unreleased]
109

11-
- We downgraded the `OPSqlite` to v15.0.7 to align it with `make-it-native` and `native-template`.
10+
- We upgraded `@op-engineering/op-sqlite` from v15.0.7 to v15.2.5.
11+
- We upgraded core native stack dependencies, including React Native (v0.78.2 -> v0.83.4), React (v19.0.0 -> v19.2.4), and `@react-native-community/cli` (v18.0.1 -> v20.1.2).
12+
- We updated supporting development tooling dependencies (ESLint, Commitlint, Prettier, Lefthook, TypeScript, Turbo, and Release It).
1213

1314
## [v0.3.2] - 2026-01-16
1415

MendixNative.podspec

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,6 @@ Pod::Spec.new do |s|
1919

2020
s.dependency "SSZipArchive"
2121
s.dependency "RNCAsyncStorage"
22-
s.dependency "ReactCommon"
23-
s.dependency "ReactAppDependencyProvider"
24-
s.dependency 'React-Core'
25-
s.dependency 'React-RCTAppDelegate'
2622

2723
install_modules_dependencies(s)
2824
end

android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ dependencies {
8888
kapt 'com.github.bumptech.glide:compiler:4.12.0'
8989

9090

91-
api "com.facebook.react:react-android:0.78.2"
91+
api "com.facebook.react:react-android:0.83.4"
9292
api project(':op-engineering_op-sqlite')
9393
api project(':react-native-async-storage_async-storage')
9494
api project(':react-native-gesture-handler')

android/gradle.properties

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
MendixNative_kotlinVersion=2.0.21
2-
MendixNative_minSdkVersion=24
3-
MendixNative_targetSdkVersion=35
4-
MendixNative_compileSdkVersion=35
2+
MendixNative_minSdkVersion=29
3+
MendixNative_targetSdkVersion=36
4+
MendixNative_compileSdkVersion=36
55
MendixNative_ndkVersion=27.3.13750724

android/src/main/java/com/facebook/react/devsupport/DevSupportManagerHelpers.kt

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,12 @@ fun setBundleDownloadListener(
99
listener: DevBundleDownloadListener
1010
) {
1111
devSupportManager?.apply {
12-
ReflectionUtils.setFieldOfSuperclass(this, "mBundleDownloadListener", listener)
12+
ReflectionUtils.setFieldOfSuperclass(
13+
this,
14+
listener,
15+
"mBundleDownloadListener",
16+
"devBundleDownloadListener"
17+
)
1318
}
1419
}
1520

@@ -18,6 +23,11 @@ fun overrideDevLoadingViewController(
1823
devLoadingViewController: DefaultDevLoadingViewImplementation
1924
) {
2025
devSupportManager.apply {
21-
ReflectionUtils.setFieldOfSuperclass(this, "mDevLoadingViewManager", devLoadingViewController)
26+
ReflectionUtils.setFieldOfSuperclass(
27+
this,
28+
devLoadingViewController,
29+
"mDevLoadingViewManager",
30+
"devLoadingViewManager"
31+
)
2232
}
2333
}

android/src/main/java/com/facebook/react/devsupport/MendixShakeDetector.kt

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import com.facebook.react.devsupport.interfaces.DevSupportManager
77
import com.mendix.mendixnative.util.ReflectionUtils
88

99
const val SHAKE_DETECTECTOR_VAR = "mShakeDetector"
10+
const val SHAKE_DETECTOR_VAR = "shakeDetector"
1011

1112
fun makeShakeDetector(applicationContext: Context, onShake: () -> Unit): ShakeDetector {
1213
val shakeDetector = ShakeDetector(onShake)
@@ -18,9 +19,28 @@ fun makeShakeDetector(applicationContext: Context, onShake: () -> Unit): ShakeDe
1819
fun attachMendixSupportManagerShakeDetector(
1920
shakeDetector: ShakeDetector,
2021
devSupportManager: DevSupportManager?
21-
): Unit = devSupportManager.let { supportManager ->
22-
val devShakeDetector =
23-
ReflectionUtils.getFieldOfSuperclass<ShakeDetector>(supportManager, SHAKE_DETECTECTOR_VAR)
24-
(devShakeDetector != shakeDetector).let { devShakeDetector.stop() }
25-
ReflectionUtils.setFieldOfSuperclass(supportManager, SHAKE_DETECTECTOR_VAR, shakeDetector)
22+
) {
23+
val supportManager = devSupportManager ?: return
24+
25+
try {
26+
val devShakeDetector =
27+
ReflectionUtils.getFieldOfSuperclass<ShakeDetector>(
28+
supportManager,
29+
SHAKE_DETECTECTOR_VAR,
30+
SHAKE_DETECTOR_VAR
31+
)
32+
33+
if (devShakeDetector !== shakeDetector) {
34+
devShakeDetector.stop()
35+
}
36+
37+
ReflectionUtils.setFieldOfSuperclass(
38+
supportManager,
39+
shakeDetector,
40+
SHAKE_DETECTECTOR_VAR,
41+
SHAKE_DETECTOR_VAR
42+
)
43+
} catch (_: RuntimeException) {
44+
// React Native internals changed; keep the Mendix detector active without replacing RN's.
45+
}
2646
}

0 commit comments

Comments
 (0)