@@ -94,29 +94,30 @@ ObjectBoxC? _tryObjectBoxLibFile() {
94
94
95
95
// Require the minimum C API version of all supported platform-specific
96
96
// libraries.
97
- // Library | C API | Core
97
+ // Library | C API | Database
98
98
// ------------------------|-------|-----------------
99
- // objectbox-c | 4.1 .0 | 4.1 .0-2025-01-28
100
- // ObjectBox Swift 4.1 .0 | 4.1 .0 | 4.1 .0-2025-01-30
101
- // objectbox-android 4.1 .0 | 4.1 .0 | 4.1 .0-2025-01-28
99
+ // objectbox-c | 4.2 .0 | 4.2 .0-2025-03-04
100
+ // ObjectBox Swift 4.2 .0 | 4.2 .0 | 4.2 .0-2025-03-27
101
+ // objectbox-android 4.2 .0 | 4.2 .0 | 4.2 .0-2025-03-04
102
102
var _obxCminMajor = 4 ;
103
- var _obxCminMinor = 1 ;
103
+ var _obxCminMinor = 2 ;
104
104
var _obxCminPatch = 0 ;
105
- // Require minimum core version guaranteeing actual C API availability.
106
- var _obxCoreMinVersion = "4.1 .0-2025-01-28 " ;
105
+ // Require minimum database version guaranteeing actual C API availability.
106
+ var _obxDatabaseMinVersion = "4.2 .0-2025-03-04 " ;
107
107
108
108
bool _isSupportedVersion (ObjectBoxC obxc) {
109
+ // Require a minimum C API version
109
110
if (! obxc.version_is_at_least (_obxCminMajor, _obxCminMinor, _obxCminPatch)) {
110
111
return false ;
111
112
}
112
- // Require a minimum core version.
113
- // As the core version string uses the
113
+ // Require a minimum database version.
114
+ // As the database version string uses the
114
115
// "major.minor.build-YYYY-MM-DD (<flags>)"
115
116
// format it should have a stable order.
116
117
// Note: if the version+date is the same the compare value will be negative as
117
118
// the flags make the string longer than the expected min version+date string.
118
- final coreVersion = dartStringFromC (obxc.version_core_string ());
119
- return _obxCoreMinVersion .compareTo (coreVersion ) <= 0 ;
119
+ final databaseVersion = dartStringFromC (obxc.version_core_string ());
120
+ return _obxDatabaseMinVersion .compareTo (databaseVersion ) <= 0 ;
120
121
}
121
122
122
123
ObjectBoxC loadObjectBoxLib () {
@@ -126,17 +127,17 @@ ObjectBoxC loadObjectBoxLib() {
126
127
127
128
if (obxc == null ) {
128
129
throw UnsupportedError (
129
- 'Could not load ObjectBox core dynamic library. Platform: ${Platform .operatingSystem }' );
130
+ 'Could not load ObjectBox dynamic database library. Platform: ${Platform .operatingSystem }' );
130
131
}
131
132
132
133
if (! _isSupportedVersion (obxc)) {
133
134
final version = dartStringFromC (obxc.version_string ());
134
- final coreVersion = dartStringFromC (obxc.version_core_string ());
135
+ final databaseVersion = dartStringFromC (obxc.version_core_string ());
135
136
throw UnsupportedError (
136
- 'ObjectBox platform-specific library not compatible: is $version ($coreVersion ),'
137
- ' expected $_obxCminMajor .$_obxCminMinor .$_obxCminPatch ($_obxCoreMinVersion ) or newer.'
138
- ' For Flutter, check if the ObjectBox Pod or objectbox-android-objectbrowser need to be updated.'
139
- ' For Dart, re-run the install.sh script to download the latest version.' );
137
+ 'ObjectBox platform-specific database library not compatible: is $version ($databaseVersion ),'
138
+ ' expected $_obxCminMajor .$_obxCminMinor .$_obxCminPatch ($_obxDatabaseMinVersion ) or newer.'
139
+ ' For Flutter apps , check if the ObjectBox Pod or the Android Admin dependency need to be updated.'
140
+ ' For unit tests or Dart Native apps , re-run the install.sh script to download the latest version.' );
140
141
}
141
142
142
143
return obxc;
0 commit comments