Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/CI_DOCUMENTATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ All workflows use standardized tooling versions to ensure consistency:
| ---------------- | -------- | ----------------------------- |
| **Node.js** | `24` | `.nvmrc` |
| **Yarn** | `4.12.0` | `package.json#packageManager` |
| **React Native** | `0.78.2` | `package.json` |
| **React** | `19.0.0` | `package.json` |
| **TypeScript** | `5.9.2` | `package.json` |
| **React Native** | `0.83.2` | `package.json` |
| **React** | `19.2.14` | `package.json` |
| **TypeScript** | `5.9.3` | `package.json` |

### Android Tooling

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/android/build.gradle b/android/build.gradle
index d36fd855813e87b17da43156be64782b325b2733..751355645c0b6e28e2df01e9bdc32f545d8dc83c 100644
index 08631df..9ef3a95 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -1,5 +1,4 @@
Expand All @@ -8,7 +8,7 @@ index d36fd855813e87b17da43156be64782b325b2733..751355645c0b6e28e2df01e9bdc32f54

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

Expand All @@ -33,7 +33,7 @@ index d36fd855813e87b17da43156be64782b325b2733..751355645c0b6e28e2df01e9bdc32f54
- // Start from the root + 1 level up (to avoid detecting the op-sqlite/package.json) and traverse upwards to find the first package.json
- File currentDir = new File("$rootDir/../")
- packageJsonFile = null
-
-
- // Try to find package.json by traversing upwards
- while (currentDir != null) {
- File potential = new File(currentDir, "package.json")
Expand All @@ -54,22 +54,21 @@ index d36fd855813e87b17da43156be64782b325b2733..751355645c0b6e28e2df01e9bdc32f54
-
-if(opsqliteConfig) {
- println "[OP-SQLITE] Detected op-sqlite config from package.json at: " + packageJsonFile.absolutePath
- useSQLCipher = opsqliteConfig["sqlcipher"]
- useCRSQLite = opsqliteConfig["crsqlite"]
- useSqliteVec = opsqliteConfig["sqliteVec"]
- useSQLCipher = !!opsqliteConfig["sqlcipher"]
- useCRSQLite = !!opsqliteConfig["crsqlite"]
- useSqliteVec = !!opsqliteConfig["sqliteVec"]
- performanceMode = opsqliteConfig["performanceMode"]
- sqliteFlags = opsqliteConfig["sqliteFlags"] ? opsqliteConfig["sqliteFlags"] : ""
- enableFTS5 = opsqliteConfig["fts5"]
- useLibsql = opsqliteConfig["libsql"]
- enableRtree = opsqliteConfig["rtree"]
- enableFTS5 = !!opsqliteConfig["fts5"]
- useLibsql = !!opsqliteConfig["libsql"]
- enableRtree = !!opsqliteConfig["rtree"]
- tokenizers = opsqliteConfig["tokenizers"] ? opsqliteConfig["tokenizers"] : []
-}
-
if(useSQLCipher) {
println "[OP-SQLITE] using sqlcipher."
} else if(useLibsql) {
diff --git a/android/cpp-adapter.cpp b/android/cpp-adapter.cpp
index 8feaf7719661ef248113f11b1643deedb4b510af..2393963bf982f80ccff2ed396f1538be7ee18fcb 100644
index 5912d7b..495880e 100644
--- a/android/cpp-adapter.cpp
+++ b/android/cpp-adapter.cpp
@@ -19,8 +19,8 @@ struct OPSQLiteBridge : jni::JavaClass<OPSQLiteBridge> {
Expand All @@ -95,7 +94,7 @@ index 8feaf7719661ef248113f11b1643deedb4b510af..2393963bf982f80ccff2ed396f1538be

JNIEXPORT jint JNI_OnLoad(JavaVM *vm, void *) {
diff --git a/android/src/main/java/com/op/sqlite/OPSQLiteBridge.kt b/android/src/main/java/com/op/sqlite/OPSQLiteBridge.kt
index 44f86df6a21a6f7272b2c79b196586ef8fec886b..9d9f7100fd34361701b2addf09a4f36e33b35d56 100644
index 44f86df..9d9f710 100644
--- a/android/src/main/java/com/op/sqlite/OPSQLiteBridge.kt
+++ b/android/src/main/java/com/op/sqlite/OPSQLiteBridge.kt
@@ -12,6 +12,7 @@ class OPSQLiteBridge {
Expand All @@ -118,20 +117,20 @@ index 44f86df6a21a6f7272b2c79b196586ef8fec886b..9d9f7100fd34361701b2addf09a4f36e
val instance = OPSQLiteBridge()
}
diff --git a/android/src/main/java/com/op/sqlite/OPSQLiteModule.kt b/android/src/main/java/com/op/sqlite/OPSQLiteModule.kt
index 688832fa2f9a7f91d16cd50495caa8c9f8873864..9ea814bfa63f27356e804b82e941b7121152db3a 100644
index 8d341b7..3ce6179 100644
--- a/android/src/main/java/com/op/sqlite/OPSQLiteModule.kt
+++ b/android/src/main/java/com/op/sqlite/OPSQLiteModule.kt
@@ -13,7 +13,7 @@ import java.io.OutputStream
@@ -12,7 +12,7 @@ import java.io.InputStream
import java.io.OutputStream
import com.facebook.react.util.RNLog;

//@ReactModule(name = OPSQLiteModule.NAME)
-internal class OPSQLiteModule(context: ReactApplicationContext?) : ReactContextBaseJavaModule(context) {
+class OPSQLiteModule(context: ReactApplicationContext?) : ReactContextBaseJavaModule(context) {
override fun getName(): String {
return NAME
}
@@ -56,6 +56,17 @@ internal class OPSQLiteModule(context: ReactApplicationContext?) : ReactContextB
return true
@@ -54,6 +54,17 @@ internal class OPSQLiteModule(context: ReactApplicationContext?) : ReactContextB
throw Exception("Do not call getDylibPath on Android")
}

+ @ReactMethod(isBlockingSynchronousMethod = true)
Expand All @@ -149,10 +148,10 @@ index 688832fa2f9a7f91d16cd50495caa8c9f8873864..9ea814bfa63f27356e804b82e941b712
fun moveAssetsDatabase(args: ReadableMap, promise: Promise) {
val filename = args.getString("filename")!!
diff --git a/cpp/DBHostObject.cpp b/cpp/DBHostObject.cpp
index 85710eea286d45685aa526ed3851e8f1e1411039..8cf10f21ba467dea430aab106d43dd4e2adeacd6 100644
index 9682941..c0b9c21 100644
--- a/cpp/DBHostObject.cpp
+++ b/cpp/DBHostObject.cpp
@@ -889,6 +889,10 @@ void DBHostObject::invalidate() {
@@ -682,6 +682,10 @@ void DBHostObject::invalidate() {
#endif
}

Expand All @@ -164,23 +163,23 @@ index 85710eea286d45685aa526ed3851e8f1e1411039..8cf10f21ba467dea430aab106d43dd4e

} // namespace opsqlite
diff --git a/cpp/DBHostObject.h b/cpp/DBHostObject.h
index cc174b7c8c5ce500a6ffe5dc6fe092d282d2554c..ff36f742a22b8a84f37d6dd28441dbe9d0c6c873 100644
index 002b8c9..f3a2e1f 100644
--- a/cpp/DBHostObject.h
+++ b/cpp/DBHostObject.h
@@ -73,6 +73,7 @@ class JSI_EXPORT DBHostObject : public jsi::HostObject {
void on_commit();
void on_rollback();
void invalidate();
+ void drop();
~DBHostObject() override;
@@ -68,6 +68,7 @@ public:
void on_commit();
void on_rollback();
void invalidate();
+ void drop();
~DBHostObject() override;

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

+bool deleteAllDbs() {
Expand All @@ -191,12 +190,12 @@ index 5e1c1de234e7bdb131769728fc862d389f9995a5..dc21c6503ffe18f3ae1cf99f327e8aa1
+}
+
void install(jsi::Runtime &rt,
const std::shared_ptr<react::CallInvoker> &invoker,
const std::shared_ptr<react::CallInvoker> &_invoker,
const char *base_path, const char *crsqlite_path,
diff --git a/cpp/bindings.h b/cpp/bindings.h
index 91511ab8dff0cbd34c6b8b844c1783c39d4317cb..cc73dfe4405d568cbfbbfa5a9c879a1d88f260bf 100644
--- a/cpp/bindings.h
+++ b/cpp/bindings.h
diff --git a/cpp/OPSqlite.hpp b/cpp/OPSqlite.hpp
index 91511ab..cc73dfe 100644
--- a/cpp/OPSqlite.hpp
+++ b/cpp/OPSqlite.hpp
@@ -14,6 +14,7 @@ void install(jsi::Runtime &rt,
const char *base_path, const char *crsqlite_path,
const char *sqlite_vec_path);
Expand All @@ -206,17 +205,17 @@ index 91511ab8dff0cbd34c6b8b844c1783c39d4317cb..cc73dfe4405d568cbfbbfa5a9c879a1d

} // namespace opsqlite
diff --git a/op-sqlite.podspec b/op-sqlite.podspec
index 375cc3ef0838a3cffb87ec970f636880a8676bb3..e6fce21630ed00aa863f2baae7b3d04de783dcb0 100644
index e717811..147f516 100644
--- a/op-sqlite.podspec
+++ b/op-sqlite.podspec
@@ -1,4 +1,3 @@
-require "json"
require_relative "./generate_tokenizers_header_file"

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

app_package = JSON.parse(File.read(package_json_path))

-op_sqlite_config = app_package["op-sqlite"]
-use_sqlcipher = false
Expand All @@ -228,7 +227,7 @@ index 375cc3ef0838a3cffb87ec970f636880a8676bb3..e6fce21630ed00aa863f2baae7b3d04d
phone_version = false
sqlite_flags = ""
fts5 = false
@@ -51,37 +49,6 @@ rtree = false
@@ -50,36 +48,7 @@ rtree = false
use_sqlite_vec = false
tokenizers = []

Expand All @@ -247,22 +246,34 @@ index 375cc3ef0838a3cffb87ec970f636880a8676bb3..e6fce21630ed00aa863f2baae7b3d04d
-
-if phone_version then
- if use_sqlcipher then
- raise "SQLCipher is not supported with phone version"
- raise "SQLCipher is not supported with phone version. It cannot load extensions."
- end
-
- if use_crsqlite then
- raise "CRSQLite is not supported with phone version"
- raise "CRSQLite is not supported with phone version. It cannot load extensions."
- end
-
- if rtree then
- raise "RTree is not supported with phone version"
- raise "RTree is not supported with phone version. It cannot load extensions."
- end
-
- if use_sqlite_vec then
- raise "SQLite Vec is not supported with phone version"
- raise "SQLite Vec is not supported with phone version. It cannot load extensions."
- end
-end
-
Pod::Spec.new do |s|
s.name = "op-sqlite"
s.version = package["version"]
@@ -158,12 +127,6 @@ Pod::Spec.new do |s|
xcconfig[:GCC_PREPROCESSOR_DEFINITIONS] += " SQLITE_ENABLE_RTREE=1"
end

- if phone_version then
- log_message.call("[OP-SQLITE] using iOS embedded SQLite 📱")
- xcconfig[:GCC_PREPROCESSOR_DEFINITIONS] += " OP_SQLITE_USE_PHONE_VERSION=1"
- exclude_files += ["cpp/sqlite3.c", "cpp/sqlite3.h"]
- s.library = "sqlite3"
- end

if performance_mode then
log_message.call("[OP-SQLITE] Performance mode enabled")
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

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

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

Expand Down
4 changes: 0 additions & 4 deletions MendixNative.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@ Pod::Spec.new do |s|

s.dependency "SSZipArchive"
s.dependency "RNCAsyncStorage"
s.dependency "ReactCommon"
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was causing issues with the new prebuilds mechanism, install_modules_dependencies should add those anyway

s.dependency "ReactAppDependencyProvider"
s.dependency 'React-Core'
s.dependency 'React-RCTAppDelegate'

install_modules_dependencies(s)
end
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ dependencies {
kapt 'com.github.bumptech.glide:compiler:4.12.0'


api "com.facebook.react:react-android:0.78.2"
api "com.facebook.react:react-android:0.83.2"
api project(':op-engineering_op-sqlite')
api project(':react-native-async-storage_async-storage')
api project(':react-native-gesture-handler')
Expand Down
6 changes: 3 additions & 3 deletions android/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
MendixNative_kotlinVersion=2.0.21
MendixNative_minSdkVersion=24
MendixNative_targetSdkVersion=35
MendixNative_compileSdkVersion=35
MendixNative_minSdkVersion=29
MendixNative_targetSdkVersion=36
MendixNative_compileSdkVersion=36
MendixNative_ndkVersion=27.3.13750724
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ open class ReactFragment : Fragment(), PermissionAwareActivity {
launchOptions = requireArguments().getBundle(ARG_LAUNCH_OPTIONS)
}
checkNotNull(mainComponentName) { "Cannot loadApp if component name is null" }
mReactDelegate = ReactDelegate(activity, reactHost, mainComponentName, launchOptions)
mReactDelegate = activity?.let { ReactDelegate(it, reactHost, mainComponentName, launchOptions) }
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ fun deleteAppDatabaseAsync(reactContext: ReactContext?, cb: BooleanCallback) {
fun clearAsyncStorage(reactNativeHost: ReactNativeHost): Boolean {
val module = reactNativeHost.typeSafeNativeModule<AsyncStorageModule>()
if (module != null) {
module.clearSensitiveData()
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

return true
} else {
return false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@ class NativeFsModule(private val reactContext: ReactApplicationContext) {

fun save(blob: ReadableMap, filePath: String, promise: Promise) {
val blobModule = reactContext.getNativeModule<BlobModule?>(BlobModule::class.java)
val blobId = blob.getString("blobId")
val blobId: String = blob.getString("blobId") ?: run {""
promise.reject(ERROR_INVALID_BLOB, "The specified blob is invalid")
return
}

val bytes = blobModule!!.resolve(blobId, blob.getInt("offset"), blob.getInt("size"))
if (bytes == null) {
Expand Down Expand Up @@ -197,12 +200,12 @@ class NativeFsModule(private val reactContext: ReactApplicationContext) {
try {
val bytes =
fileBackend.read(ensureWhiteListedPath(filepath))
val typeRef: TypeReference<MutableMap<String?, Any?>?> =
object : TypeReference<MutableMap<String?, Any?>?>() {
val typeRef: TypeReference<MutableMap<String, Any?>?> =
object : TypeReference<MutableMap<String, Any?>?>() {
}
promise.resolve(
Arguments.makeNativeMap(
ObjectMapper().readValue<MutableMap<String?, Any?>?>(
ObjectMapper().readValue<MutableMap<String, Any?>?>(
bytes,
typeRef
)
Expand Down
8 changes: 4 additions & 4 deletions example/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
buildscript {
ext {
buildToolsVersion = "35.0.0"
minSdkVersion = 24
compileSdkVersion = 35
targetSdkVersion = 35
buildToolsVersion = "36.0.0"
minSdkVersion = 29
compileSdkVersion = 36
targetSdkVersion = 36
ndkVersion = "27.3.13750724"
kotlinVersion = "2.0.21"
}
Expand Down
2 changes: 1 addition & 1 deletion example/android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.0.0-all.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
2 changes: 2 additions & 0 deletions example/ios/MendixNativeExample.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,7 @@
);
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
OTHER_CFLAGS = "$(inherited)";
OTHER_CPLUSPLUSFLAGS = (
"$(OTHER_CFLAGS)",
"-DFOLLY_NO_CONFIG",
Expand Down Expand Up @@ -444,6 +445,7 @@
"\"$(inherited)\"",
);
MTL_ENABLE_DEBUG_INFO = NO;
OTHER_CFLAGS = "$(inherited)";
OTHER_CPLUSPLUSFLAGS = (
"$(OTHER_CFLAGS)",
"-DFOLLY_NO_CONFIG",
Expand Down
3 changes: 2 additions & 1 deletion example/ios/MendixNativeExample/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,15 @@
<true/>
<key>NSAppTransportSecurity</key>
<dict>
<!-- Do not change NSAllowsArbitraryLoads to true, or you will risk app rejection! -->
<key>NSAllowsArbitraryLoads</key>
<false/>
<key>NSAllowsLocalNetworking</key>
<true/>
</dict>
<key>NSLocationWhenInUseUsageDescription</key>
<string></string>
<key>RCTNewArchEnabled</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIRequiredDeviceCapabilities</key>
Expand Down
Loading